`ErrorHandlingDeserializer` ergänzt spring/spring-consumer--kafkahandler--deserialization-error
authorKai Moritz <kai@juplo.de>
Fri, 21 Mar 2025 06:15:24 +0000 (07:15 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 21 Mar 2025 06:15:24 +0000 (07:15 +0100)
src/main/resources/application.yml

index b3e3358..547122d 100644 (file)
@@ -27,8 +27,9 @@ spring:
     client-id: DEV
     consumer:
       group-id: my-group
-      value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
+      value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
       properties:
+        "[spring.deserializer.value.delegate.class]": org.springframework.kafka.support.serializer.JsonDeserializer
         "[spring.json.type.mapping]": ADD:de.juplo.kafka.MessageAddNumber,CALC:de.juplo.kafka.MessageCalculateSum
   level:
     root: INFO