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.
Unclear what you mean "preconfigured". The file in the link doesn't run any broker, only Postgres database and Conduktor console container.
If you want to run RedPanda, you need to edit that compose file rather than immediately
upit.If RedPanda broker is running in an existing container, then you still need to modify the Compose file to add networks so that
redpanda-1is a known DNS address.Related - Connect to Kafka running in Docker