All Products
Search
Document Center

ApsaraMQ for RabbitMQ:Are message retries supported?

Last Updated:Aug 31, 2023

Yes, ApsaraMQ for RabbitMQ supports message retries. A message is retried after it fails to be consumed.

Retry mechanism

The ApsaraMQ for RabbitMQ broker has a default message retry mechanism. You cannot disable it or configure a new one on the consumer client. The following items describe the default message retry mechanism on the ApsaraMQ for RabbitMQ broker:

  • The message retry mechanism can be triggered only when you enable message consumption on consumer clients.

  • If you enable message consumption on a consumer client, consumption failures trigger message retries. If the consumer client does not acknowledge a message within one minute after the message is sent, the message consumption is considered failed.

    • If the consumer client successfully consumes the message, the broker immediately stops retrying the message.

    • Retry interval:

      • Professional Edition instance: 60 seconds

      • Enterprise Edition instance: 5 minutes

      • Platinum Edition instance: 30 minutes

    • A message can be retried up to 16 times. If a message still fails to be consumed after it is retried 16 times, it stops being retried. The following items list the options that you have in this case:

      • Discard the message. If you do not configure a dead-letter exchange for the queue of the message, the message is discarded.

      • Send the message to a dead-letter exchange. If you configure a dead-letter exchange for the queue, the message is sent to the dead-letter exchange and then routed to a dead-letter queue based on the routing key and binding key. You can query and export messages in a dead-letter queue. For more information about how to configure a dead-letter exchange, see Dead-letter exchange.