I have a rabbit queue with messages for consuming. I also have a listener that can fail. The queue is configured with a dead letter exchange (along with a dead letter queue). What I want is to see an exception info in the messages sitting in the dead letter queue.
Here is how it works currently:
No; RabbitMQ (actually the AMQP specification) provides no mechanism for the consumer to to enhance rejected messages with additional information. The protocol only supports acknowledging or rejecting messages.
Spring AMQP, together with a retry interceptor, provides a mechanism to republish the message to a different queue (which can be the same as the DLQ) with additional information in the headers (exception stack trace etc).