I installed zookeeper and Kafka using docker with help of following link https://crunchytechbytz.wordpress.com/2018/01/28/install-apache-kafka-in-docker-container/
Now I want to publish a message on one of the topic in kafka. If I get ip of docker kafka by using the following command.
docker network inspect kafka-net
I use this ip in my application. I am able to publish message to kafka queue. How we can do the automatic mapping.
I tried one-way mapping docker container port to mapping outer port. This makes it very slow and After this consumer also not able to consume this.