13 lines
796 B
Bash
Raw Permalink Normal View History

KAFKA_ZOOKEEPER_CONNECT=test_zookeeper:52181
# Read this excellent guide to understand why this is being set up like this
# https://www.confluent.io/blog/kafka-listeners-explained/
# Essentially: we run two listeners named PLAINTEXT and PLAINTEXT_HOST on two different ports
# in the container, and we advertise ONE of them (PLAINTEXT_HOST) to Kafka clients as running on the localhost
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS=PLAINTEXT://test_broker:9092,PLAINTEXT_HOST://test_broker:29092
KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://test_broker:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0
KAFKA_HEAP_OPTS=-Xms256m -Xmx256m