I’m familiar with Apache Kafka in a general sense but I am looking to dive deeper. I decided to put together a quick docker-compose.yml file to get up and running quickly. (file is at the end of this post)
In the compose file, there’s even a container just for the Kafka CLI tools. Normally, we’d be able to set the KAFKA_ADVERTISED_LISTENERS variable to be localhost and we could use the Kafka CLI from a regular terminal session. I am planning to grow this stack to include a few more components, and I want to keep all direct Kafka connectivity inside the Docker network.
Here’s how to use it. First copy the yml file at the bottom of this post to your local system.