Skip to content

Commit ce946fd

Browse files
committed
GH-1700: Highlight Config of Default Dest Resolver
See #1700
1 parent 12932f7 commit ce946fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/reference/asciidoc/kafka.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5140,8 +5140,10 @@ As <<stateful-retry,discussed earlier>>, you can configure the `SeekToCurrentErr
51405140
The framework provides the `DeadLetterPublishingRecoverer`, which publishes the failed message to another topic.
51415141
The recoverer requires a `KafkaTemplate<Object, Object>`, which is used to send the record.
51425142
You can also, optionally, configure it with a `BiFunction<ConsumerRecord<?, ?>, Exception, TopicPartition>`, which is called to resolve the destination topic and partition.
5143-
By default, the dead-letter record is sent to a topic named `<originalTopic>.DLT` (the original topic name suffixed with `.DLT`) and to the same partition as the original record.
5144-
Therefore, when you use the default resolver, the dead-letter topic must have at least as many partitions as the original topic.
5143+
5144+
IMPORTANT: By default, the dead-letter record is sent to a topic named `<originalTopic>.DLT` (the original topic name suffixed with `.DLT`) and to the same partition as the original record.
5145+
Therefore, when you use the default resolver, the dead-letter topic **must have at least as many partitions as the original topic.**
5146+
51455147
If the returned `TopicPartition` has a negative partition, the partition is not set in the `ProducerRecord`, so the partition is selected by Kafka.
51465148
Starting with version 2.2.4, any `ListenerExecutionFailedException` (thrown, for example, when an exception is detected in a `@KafkaListener` method) is enhanced with the `groupId` property.
51475149
This allows the destination resolver to use this, in addition to the information in the `ConsumerRecord` to select the dead letter topic.

0 commit comments

Comments
 (0)