From 130a295d04fc41ea1f503eb28853cbb4c4ec1a1c Mon Sep 17 00:00:00 2001 From: Byungjun You Date: Thu, 12 Jan 2023 00:27:14 +0900 Subject: [PATCH] fix the default DLT name in kafka_tips.adoc --- docs/src/main/asciidoc/kafka/kafka_tips.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/kafka/kafka_tips.adoc b/docs/src/main/asciidoc/kafka/kafka_tips.adoc index ee72a9086..5431d8a4a 100644 --- a/docs/src/main/asciidoc/kafka/kafka_tips.adoc +++ b/docs/src/main/asciidoc/kafka/kafka_tips.adoc @@ -19,6 +19,7 @@ public Consumer processData() { return s -> { throw new RuntimeException(); }; +} ``` This is a very trivial function that throws an exception for all the records that it processes, but you can take this function and extend it to any other similar situations. @@ -42,7 +43,7 @@ spring.cloud.stream: In order to activate DLQ, the application must provide a group name. Anonymous consumers cannot use the DLQ facilities. We also need to enable DLQ by setting the `enableDLQ` property on the Kafka consumer binding to `true`. -Finally, we can optionally provide the DLT name by providing the `dlqName` on Kafka consumer binding, which otherwise default to `input-topic-dlq.my-group.error` in this case. +Finally, we can optionally provide the DLT name by providing the `dlqName` on Kafka consumer binding, which otherwise default to `error.input-topic.my-group` in this case. Note that in the example consumer provided above, the type of the payload is `byte[]`. By default, the DLQ producer in Kafka binder expects the payload of type `byte[]`. @@ -163,7 +164,7 @@ We also need to configure an `ErrorHandlingDeserializer` for the consumer. That sounds like a lot of complex things, but in reality, it boils down to these 3 beans in this case. ``` -@Bean + @Bean public ListenerContainerCustomizer> customizer(DefaultErrorHandler errorHandler) { return (container, dest, group) -> { container.setCommonErrorHandler(errorHandler);