Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (31 loc) · 1.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
31 lines (31 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# A single Kafka broker (KRaft: no ZooKeeper) for trying out tableparser-kafka-cats and tableparser-kafka-zio locally.
# See KAFKA.md. Start it with `docker compose up -d`, and stop it with `docker compose down`.
# The broker is at localhost:9092 (from the host, and from inside the container).
services:
kafka:
# The same Kafka version as the client which the Kafka modules use.
image: apache/kafka:4.3.1
container_name: tableparser-kafka
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
# One broker, so every internal topic has one replica.
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_NUM_PARTITIONS: 1
# A topic is created when it's first written to (convenient for trying things out; turn it off in production).
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 > /dev/null 2>&1"]
interval: 5s
timeout: 10s
retries: 12