WIP:kafka
authorKai Moritz <kai@juplo.de>
Sat, 16 Sep 2023 20:09:42 +0000 (22:09 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 16 Sep 2023 20:09:42 +0000 (22:09 +0200)
docker-compose.yml

index ef1104b..cb124e2 100644 (file)
@@ -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