From 9cf0d39cbc1ca8e02efac10a09f497186fc2ed21 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 13 Apr 2022 22:18:21 +0200 Subject: [PATCH] Springify: `ErrorHandlingDeserializer` bricht die Schleife * Die Konfiguration eines `ErrorHandlingDeserializer` durchbricht die Endlosschleife. * Das Default-Verhalten von Spring Kafka ist aber dann in dem Fall, den Fehler zu loggen und dann zu skippen. * Dieses Verhalten wird von dem `DefaultErrorHandler` vorgegeben --- src/main/resources/application.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1cb6212..afc074c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -31,7 +31,9 @@ spring: client-id: ${consumer.client-id} auto-offset-reset: ${consumer.auto-offset-reset} group-id: ${consumer.group-id} - value-deserializer: org.apache.kafka.common.serialization.LongDeserializer + value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer + properties: + spring.deserializer.value.delegate.class: org.apache.kafka.common.serialization.LongDeserializer logging: level: root: INFO -- 2.20.1