Add new interface DeadLetterTopicNameExtractor
fhussonnois opened this issue · 0 comments
Is your feature request related to a problem? Please describe.
Currently, the DeadLetterTopicExceptionHandler
determines the DLQ Topic to send corrupted records by using either the configured topic.name or by adding the -rejected
suffix the topic name of the record.
Unfortunately, this mechanism is not very flexible and does not allow, for example, to change the hard-coded suffix or to dynamically extract the topic name from the exception or the record in error.
Describe the solution you'd like
This issue proposes to introduce a new pluggable interface DeadLetterTopicNameExtractor
with a default implementation to support the current beahvior. Developers will be able to configure a custom DeadLetterTopicNameExtractor
through a new property exception.handler.dlq.default.topic.extractor
.