From: Kai Moritz Date: Fri, 18 Aug 2023 14:27:29 +0000 (+0200) Subject: NG X-Git-Tag: rebase--2023-08-18-abends~4 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=3fd14b9d0c32ae1006296777f37b989f60c811b2;p=demos%2Fkafka%2Fchat NG --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java index 4f6e918b..af8c0aad 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java @@ -109,11 +109,11 @@ public class KafkaServicesConfiguration } @Bean - Consumer chatMessageChannelConsumer( + Consumer chatMessageChannelConsumer( Properties defaultConsumerProperties, ChatBackendProperties chatBackendProperties, StringDeserializer stringDeserializer, - JsonDeserializer messageDeserializer) + JsonDeserializer messageDeserializer) { Map properties = new HashMap<>(); defaultConsumerProperties.forEach((key, value) -> properties.put(key.toString(), value)); @@ -136,14 +136,11 @@ public class KafkaServicesConfiguration } @Bean - JsonDeserializer chatMessageDeserializer() + JsonDeserializer chatMessageDeserializer() { - JsonDeserializer deserializer = new JsonDeserializer<>(); + JsonDeserializer deserializer = new JsonDeserializer<>(); deserializer.configure( - Map.of( - JsonDeserializer.USE_TYPE_INFO_HEADERS, false, - JsonDeserializer.VALUE_DEFAULT_TYPE, ChatMessageTo.class, - JsonDeserializer.TRUSTED_PACKAGES, getClass().getPackageName()), + Map.of(JsonDeserializer.TRUSTED_PACKAGES, getClass().getPackageName()), false ); return deserializer; }