smallrye-reactive-messaging icon indicating copy to clipboard operation
smallrye-reactive-messaging copied to clipboard

allow to customize headers on message moved to DLT

Open vsevel opened this issue 2 years ago • 0 comments

When using failure strategy "dead-letter-queue", nacked messages are copied into the dead letter topic, with new headers: dead-letter-reason, dead-letter-offset, dead-letter-partition, dead-letter-topic, dead-letter-cause. Right now those headers are hard coded into KafkaDeadLetterQueue. Error headers are an important aspect of the ability for the ops teams to work on rules of auto-remediation, or direct the alerting toward the appropriate support team. Sometimes the error message and its direct cause are sufficient, sometimes the application may want to convey some other information that will help with error handling. e.g. functional vs thecnical issue, normalized error code, security sensitivity, ... It would be nice to allow a custom error handler to get an opportunity to watch the error, and add whatever custom headers are required to allow proper error handling in the organization.

cc @ozangunalp

vsevel avatar Jul 14 '22 07:07 vsevel