Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • in addition to Cricket answer you can then add kafka in your host file and connect to it from out side the docker-compose, given KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092, bootstrap-servers: kafka:9092 and ports - 9092:9092 Commented Nov 1, 2018 at 14:16
  • @Paizo Editing the hosts file is a hack, and should be avoided. Correcting the listeners is the correct thing. Commented Nov 1, 2018 at 16:42
  • @DonRhummy See updated answer. The gist here is that you can't have the same spring config working inside and outside of Docker Commented Nov 1, 2018 at 16:45
  • @cricket_007 I get the error java.lang.IllegalArgumentException: requirement failed: advertised.listeners listener names must be equal to or a subset of the ones defined in listeners. Found PLAINTEXT,PLAINTEXT_HOST. The valid options based on the current configuration are PLAINTEXT Commented Nov 1, 2018 at 19:34
  • @DonRhummy Have you defined KAFKA_LISTENER_SECURITY_PROTOCOL_MAP, as mentioned in my answer? Commented Nov 1, 2018 at 20:08