How do you connect your Java Producer to a preconfigured Kafka in Red Panda?
18:45 05 Sep 2023

I'm learning Kafka via Conduktor. I ran this command on their get-started page:

curl -L https://releases.conduktor.io/console -o docker-compose.yml && docker compose up -d --wait && echo "Conduktor started on http://localhost:8080"

Now when I visit the console and view the connection, I see it has a bootstrap server of redpanda-1:9021

What confuses me is I cannot seem to access this in my Java Producer/Consumer application. It just simply cannot find it. I assume it is because it is in a container?

EDIT: Already voted to close. Yep, I asked this question with minimal understanding of Kafka, and was just hoping to be able to use the "preconfigured kafka" inside Conduktor for immediate use in a Java App. All good now. Thank you all for your answers.

java docker apache-kafka redpanda