From bc6ef381cb91604c1e3c1e06f4f61c57169b5567 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 16 Sep 2023 22:09:42 +0200 Subject: [PATCH] WIP:kafka --- docker-compose.yml | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ef1104ba..cb124e28 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,34 +43,31 @@ services: backend-1: image: juplo/chat-backend:0.0.1-SNAPSHOT environment: - chat.backend.inmemory.sharding-strategy: kafkalike - chat.backend.inmemory.num-shards: 10 - chat.backend.inmemory.owned-shards: 1, 3, 4, 9 - chat.backend.inmemory.storage-strategy: mongodb - spring.data.mongodb.host: mongo - spring.data.mongodb.database: test + chat.backend.services: kafka + chat.backend.kafka.instance-uri: http://backend-1 + chat.backend.kafka.client-id-prefix: 1 + chat.backend.kafka.bootstrap-servers: kafka:9092 + chat.backend.kafka.num-partitions: 10 ports: - 8081:8080 backend-2: image: juplo/chat-backend:0.0.1-SNAPSHOT environment: - chat.backend.inmemory.sharding-strategy: kafkalike - chat.backend.inmemory.num-shards: 10 - chat.backend.inmemory.owned-shards: 0, 2, 7 - chat.backend.inmemory.storage-strategy: mongodb - spring.data.mongodb.host: mongo - spring.data.mongodb.database: test + chat.backend.services: kafka + chat.backend.kafka.instance-uri: http://backend-2 + chat.backend.kafka.client-id-prefix: 2 + chat.backend.kafka.bootstrap-servers: kafka:9092 + chat.backend.kafka.num-partitions: 10 ports: - 8082:8080 backend-3: image: juplo/chat-backend:0.0.1-SNAPSHOT environment: - chat.backend.inmemory.sharding-strategy: kafkalike - chat.backend.inmemory.num-shards: 10 - chat.backend.inmemory.owned-shards: 5, 6, 8 - chat.backend.inmemory.storage-strategy: mongodb - spring.data.mongodb.host: mongo - spring.data.mongodb.database: test + chat.backend.services: kafka + chat.backend.kafka.instance-uri: http://backend-3 + chat.backend.kafka.client-id-prefix: 3 + chat.backend.kafka.bootstrap-servers: kafka:9092 + chat.backend.kafka.num-partitions: 10 ports: - 8083:8080 -- 2.20.1