JurajRabcan
JurajRabcan

Reputation: 133

RabbitMQ - notification if message is waiting too long in queue

Is there a way how to get notification from RabbitMQ if a message is waiting in queue for a long time?

Upvotes: 1

Views: 789

Answers (1)

StuartLC
StuartLC

Reputation: 107367

A common and standard solution to ensure that a delivery latency requirement is met is to set a Time To Live (TTL) on the message, and if this expires, this will be moved to the Dead Letter Queue where you can perform compensating actions.

TTL can be defined

  • On a per-message basis by the message publisher
  • As a default on the queue itself

If both the queue and the message have the TTL set, then the lower latency will be policed.

Upvotes: 1

Related Questions