The RabbitMQ transport supports the following transport transaction modes:
- Transport transaction - receive only
- Unreliable (transactions disabled)
Transport transaction - receive only
In ReceiveOnly
mode, messages are consumed in manual acknowledgment mode. Successfully processed messages are acknowledged via the AMQP basic.ack method, at which point the broker will remove them from the queue. Failed messages that need to be retried are re-queued via the AMQP basic.reject method.
If the connection to the broker is lost before a message can be acknowledged, even if the message was successfully processed, the broker will automatically re-queue the message. This will result in the endpoint processing the same message multiple times.
Unreliable (transactions disabled)
Like in ReceiveOnly
mode, messages are consumed in manual acknowledgment mode. Regardless of whether a message is successfully processed, it is acknowledged via the AMQP basic.ack method after the processing attempt. This means a message will be attempted once and moved to the error queue if it fails.
Since manual acknowledgment mode is being used, if the connection to the broker is lost for any reason before a message can be acknowledged, the broker will automatically re-queue the message. If this occurs, the endpoint will retry the message despite the transaction mode setting.