[rabbitmq-discuss] Schedule Messages

Matthias Radestock matthias at rabbitmq.com
Fri Oct 1 12:26:46 BST 2010

Matthias Radestock wrote:
> Doug Barth wrote:
>> We needed similar functionality.
> There are two features which we are planning to implement in RabbitMQ 
> (please don't ask when ;) that in their combination can provide 
> delayed/scheduled message functionality: 1) per-queue message TTLs, and 
> 2) dead-letter exchanges. The setup would look something like this:
> [...]

Another solution, which you can implement right now, is to get the 
publishers to stick an expiry header into the message and to publish the 
message to a dedicated delay queue. A helper app consumes messages from 
that queue one at a time and checks the expiry. If the expiry is in the 
past it re-publishes the message to the appropriate exchange for 
routing. Otherwise it waits until the deadline.

The expiries must be monotonically increasing per delay queue, though 
you can setup several delay queues for different expiry intervals.



More information about the rabbitmq-discuss mailing list