Last active
May 22, 2019 11:30
-
-
Save rmoff/da2e882a49a55740b242df893e48734f to your computer and use it in GitHub Desktop.
Example Docker Compose showing Apache Kafka listener configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| […] | |
| kafka0: | |
| image: "confluentinc/cp-enterprise-kafka:5.2.1" | |
| ports: | |
| - '9092:9092' | |
| - '29094:29094' | |
| depends_on: | |
| - zookeeper | |
| environment: | |
| […] | |
| # For more details see See https://rmoff.net/2018/08/02/kafka-listeners-explained/ | |
| KAFKA_LISTENERS: LISTENER_BOB://kafka0:29092,LISTENER_FRED://kafka0:9092,LISTENER_ALICE://kafka0:29094 | |
| KAFKA_ADVERTISED_LISTENERS: LISTENER_BOB://kafka0:29092,LISTENER_FRED://localhost:9092,LISTENER_ALICE://never-gonna-give-you-up:29094 | |
| KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_BOB:PLAINTEXT,LISTENER_FRED:PLAINTEXT,LISTENER_ALICE:PLAINTEXT | |
| KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_BOB | |
| […] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment