diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -20,7 +20,7 @@ - "5092:5092" env_file: ./env/kafka.env environment: - KAFKA_BROKER_ID: 1 + # all other kafka config options are defined in env/kafka.env KAFKA_CREATE_TOPICS: swh.journal.objects.content:16:1:compact, swh.journal.objects.directory:16:1:compact, swh.journal.objects.extid:16:1:compact, @@ -35,10 +35,6 @@ swh.journal.objects.skipped_content:16:1:compact, swh.journal.objects.snapshot:16:1:compact, swh.journal.indexed.origin_intrinsic_metadata:16:1:compact - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://127.0.0.1:5092 - KAFKA_LISTENERS: PLAINTEXT://:9092,PLAINTEXT_HOST://:5092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT depends_on: - zookeeper healthcheck: diff --git a/docker/env/kafka.env b/docker/env/kafka.env --- a/docker/env/kafka.env +++ b/docker/env/kafka.env @@ -1,8 +1,8 @@ -KAFKA_ADVERTISED_HOST_NAME=kafka -KAFKA_ADVERTISED_PORT=9092 -KAFKA_PORT=9092 -KAFKA_LISTENERS=PLAINTEXT://:9092 -KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 +KAFKA_BROKER_ID=1 +KAFKA_ADVERTISED_LISTENERS=DOCKER://kafka:9092,HOST://localhost:5092 +KAFKA_LISTENERS=DOCKER://:9092,HOST://:5092 +KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=DOCKER:PLAINTEXT,HOST:PLAINTEXT +KAFKA_INTER_BROKER_LISTENER_NAME=DOCKER KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 KAFKA_MESSAGE_MAX_BYTES=104857600 KAFKA_JMX_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka -Dcom.sun.management.jmxremote.rmi.port=1099