5. Error Channels

Starting with version 1.3, the binder unconditionally sends exceptions to an error channel for each consumer destination and can also be configured to send async producer send failures to an error channel. See ??? for more information.

RabbitMQ has two types of send failures:

The latter is rare. According to the RabbitMQ documentation "[A nack] will only be delivered if an internal error occurs in the Erlang process responsible for a queue.".

As well as enabling producer error channels (as described in ???), the RabbitMQ binder only sends messages to the channels if the connection factory is appropriately configured, as follows:

When using Spring Boot configuration for the connection factory, set the following properties:

The payload of the ErrorMessage for a returned message is a ReturnedAmqpMessageException with the following properties:

For negatively acknowledged confirmations, the payload is a NackedAmqpMessageException with the following properties:

There is no automatic handling of these exceptions (such as sending to a dead-letter queue). You can consume these exceptions with your own Spring Integration flow.