Skip to content

Commit

Permalink
Fix docker-compose for kafka and add new topics
Browse files Browse the repository at this point in the history
  • Loading branch information
root691 authored Apr 10, 2024
1 parent 60a9e3b commit c6bcab5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tools/kafka-dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ services:
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://fintech-kafka:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka:29092,CONTROLLER://kafka:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@fintech-kafka:29093'
KAFKA_LISTENERS: 'PLAINTEXT://fintech-kafka:29092,CONTROLLER://fintech-kafka:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
Expand All @@ -30,7 +30,7 @@ services:
- kafka
environment:
KAFKA_CLUSTERS_0_NAME: 'local'
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: 'kafka:29092'
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: 'fintech-kafka:29092'
KAFKA_CLUSTERS_0_METRICS_PORT: 9997
DYNAMIC_CONFIG_ENABLED: 'true'
ports:
Expand All @@ -48,15 +48,17 @@ services:
command: |
"
# blocks until kafka is reachable
kafka-topics --bootstrap-server kafka:29092 --list
kafka-topics --bootstrap-server fintech-kafka:29092 --list
echo -e 'Creating kafka topics'
kafka-topics --bootstrap-server kafka:29092 --create --if-not-exists --topic new-agreements --replication-factor 1 --partitions 1
kafka-topics --bootstrap-server fintech-kafka:29092 --create --if-not-exists --topic new-agreements --replication-factor 1 --partitions 1
kafka-topics --bootstrap-server fintech-kafka:29092 --create --if-not-exists --topic scoring-request --replication-factor 1 --partitions 1
kafka-topics --bootstrap-server fintech-kafka:29092 --create --if-not-exists --topic scoring-response --replication-factor 1 --partitions 1
echo -e 'Successfully created the following topics:'
kafka-topics --bootstrap-server kafka:29092 --list
kafka-topics --bootstrap-server fintech-kafka:29092 --list
"
networks:
fintech-network:
name: "fintech-network"
name: "fintech-network"

0 comments on commit c6bcab5

Please sign in to comment.