NEU
authorKai Moritz <kai@juplo.de>
Thu, 20 Apr 2023 09:06:29 +0000 (11:06 +0200)
committerKai Moritz <kai@juplo.de>
Thu, 20 Apr 2023 09:06:29 +0000 (11:06 +0200)
src/test/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java

index 3b4bc16..c157cce 100644 (file)
@@ -68,7 +68,7 @@ public class KafkaServicesConfiguration
 
   @Bean
   Producer<Integer, ChatRoomTo>  chatRoomChannelProducer(
-      Map<String, String> defaultProducerProperties,
+      Map<String, Object> defaultProducerProperties,
       IntegerSerializer integerSerializer,
       JsonSerializer<ChatRoomTo> chatRoomSerializer)
   {
@@ -93,11 +93,11 @@ public class KafkaServicesConfiguration
 
   @Bean
   Consumer<Integer, ChatRoomTo>  chatRoomChannelConsumer(
-      Map<String, String> defaultConsumerProperties,
+      Map<String, Object> defaultConsumerProperties,
       IntegerDeserializer integerDeserializer,
       JsonDeserializer<ChatRoomTo> chatRoomDeserializer)
   {
-    Map<String, String> properties = new HashMap<>();
+    Map<String, Object> properties = new HashMap<>(defaultConsumerProperties);
     properties.put(
         ConsumerConfig.GROUP_ID_CONFIG,
         "chat_room_channel");
@@ -143,7 +143,7 @@ public class KafkaServicesConfiguration
 
   @Bean
   Producer<String, MessageTo>  chatMessageChannelProducer(
-      Map<String, String> defaultProducerProperties,
+      Map<String, Object> defaultProducerProperties,
       StringSerializer stringSerializer,
       JsonSerializer<MessageTo> messageSerializer)
   {
@@ -168,11 +168,11 @@ public class KafkaServicesConfiguration
 
   @Bean
   Consumer<String, MessageTo>  chatMessageChannelConsumer(
-      Map<String, String> defaultConsumerProperties,
+      Map<String, Object> defaultConsumerProperties,
       StringDeserializer stringDeserializer,
       JsonDeserializer<MessageTo> messageDeserializer)
   {
-    Map<String, String> properties = new HashMap<>();
+    Map<String, Object> properties = new HashMap<>(defaultConsumerProperties);
     properties.put(
         ConsumerConfig.GROUP_ID_CONFIG,
         "chat_message_channel");
@@ -196,7 +196,7 @@ public class KafkaServicesConfiguration
   }
 
   @Bean
-  Map<String, String> defaultProducerProperties(ChatBackendProperties chatBackendProperties)
+  Map<String, Object> defaultProducerProperties(ChatBackendProperties chatBackendProperties)
   {
     return Map.of(
         ProducerConfig.CLIENT_ID_CONFIG,
@@ -206,7 +206,7 @@ public class KafkaServicesConfiguration
   }
 
   @Bean
-  Map<String, String> defaultConsumerProperties(ChatBackendProperties chatBackendProperties)
+  Map<String, Object> defaultConsumerProperties(ChatBackendProperties chatBackendProperties)
   {
     return Map.of(
         ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,