Error Retries with
Exponential Backoff
Using RabbitMQ
2020-02-25
2
www.luxoft.com
Agenda
 Motivation
 RabbitMQ terminology
 Three different approaches to the same issue (demo)
 Q&A
Repo link:
https://bitbucket.org/serhiizem/rmq-demo
3
www.luxoft.com
Direct inter-process communication
reduces total system availability
4
www.luxoft.com
A system communicating through an intermediary has finer availability
Participants are no longer obliged to wait
for the response from the counterparty
5
www.luxoft.com
A system communicating through an intermediary has finer availability
Participants are no longer obliged to wait
for the response from the counterparty
6
www.luxoft.com
The AMQP protocol
AMQP (Advanced Message Queuing Protocol) is a messaging protocol that enables conforming client applications to communicate with
conforming messaging middleware brokers.
7
www.luxoft.com
Looking into the RabbitMQ implementation of AMQP
Exponential backoff using pure RMQ configuration (no Java code)
The configuration is still flexible and can be extended
10
www.luxoft.com
Exponential backoff using the Spring
AMQP module and its
ExponentialBackoffPolicy
11
www.luxoft.com
Exponential backoff using the Spring
AMQP module and its
ExponentialBackoffPolicy
12
www.luxoft.com
RabbitMQ Delayed Message Plugin
Plugin is considered experimental, but it can solve
the problem of exponential backoff quite well.
However, there are few limitations:
• There is no replication of delayed messages
• Delay is not persisted
• There is a limit for the number of messages
Thank You!

Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"