I'm looking for a solution to set up delayed jobs in node.js web app.
My first idea was to use RabbitMQ - Dead Letter Exchanges and Per-Message Time-To-Live. By marking messages as persistent we can get a guarantee that a message won't be lost. A TTL can be specified on a per-message basis, so for each task an delay in milliseconds can be specified - this is also important, we can have any value as a message expiration property. But there is a caution on RabbitMQ site:
expired messages can queue up behind non-expired ones until the latter are consumed or expired.
For example if there are messages in queue with following expirations fields: 30s 20s 10s, handlers for messages will be fired in the same order, not as expected 10s 20s 30s.
So I need another solution which is just works out of box.