title: how to connect to localhost:9092 from docker container using docker-compose and not using docker bridge
body: <p>I am running Kafka server on my <strong>local machine</strong> on port 9092.
  I  am running a service in <strong>docker container using docker-compose</strong> which needs to send message to kafka server.</p>
  
  <p>I tried writing my producer in service code using 'localhost' and IP as well but both are not working.</p>
  
  <p>Can anyone help me to fix the issue?</p>