X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2Fimplementation%2Fkafka%2FKafkaServicesConfiguration.java;h=77955168787b9d5d607edd2cf41683fcd0393b0c;hb=8d997cc65763b3f12fb680da67f471590e6eeeb2;hp=5bde07cdd2ba5e1e8782b334f4b050a3fb38dc47;hpb=f3d558866e0f2a1cb002b558f3d094159a31daf5;p=demos%2Fkafka%2Fchat diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesConfiguration.java index 5bde07cd..77955168 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesConfiguration.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesConfiguration.java @@ -51,7 +51,7 @@ public class KafkaServicesConfiguration ThreadPoolTaskExecutor taskExecutor, InfoChannel infoChannel, Consumer infoChannelConsumer, - ConsumerTaskExecutor.WorkAssignor infoChannelWorkAssignor) + WorkAssignor infoChannelWorkAssignor) { return new ConsumerTaskExecutor( taskExecutor, @@ -61,8 +61,7 @@ public class KafkaServicesConfiguration } @Bean - ConsumerTaskExecutor.WorkAssignor infoChannelWorkAssignor( - ChatBackendProperties properties) + WorkAssignor infoChannelWorkAssignor(ChatBackendProperties properties) { return consumer -> { @@ -82,7 +81,7 @@ public class KafkaServicesConfiguration ThreadPoolTaskExecutor taskExecutor, DataChannel dataChannel, Consumer dataChannelConsumer, - ConsumerTaskExecutor.WorkAssignor dataChannelWorkAssignor) + WorkAssignor dataChannelWorkAssignor) { return new ConsumerTaskExecutor( taskExecutor, @@ -92,7 +91,7 @@ public class KafkaServicesConfiguration } @Bean - ConsumerTaskExecutor.WorkAssignor dataChannelWorkAssignor( + WorkAssignor dataChannelWorkAssignor( ChatBackendProperties properties, DataChannel dataChannel) { @@ -125,7 +124,8 @@ public class KafkaServicesConfiguration return new InfoChannel( properties.getKafka().getInfoChannelTopic(), producer, - infoChannelConsumer); + infoChannelConsumer, + properties.getKafka().getInstanceUri()); } @Bean @@ -134,7 +134,8 @@ public class KafkaServicesConfiguration Producer producer, Consumer dataChannelConsumer, ZoneId zoneId, - Clock clock) + Clock clock, + InfoChannel infoChannel) { return new DataChannel( properties.getKafka().getDataChannelTopic(), @@ -143,7 +144,8 @@ public class KafkaServicesConfiguration zoneId, properties.getKafka().getNumPartitions(), properties.getChatroomBufferSize(), - clock); + clock, + infoChannel); } @Bean