Closed molinto closed 8 years ago
You are confusing optional queue arguments with headers and headers exchanges, which route based on message headers.
See options
in Channel#publish
: https://github.com/squaremo/amqp.node/blob/master/lib/channel_model.js#L159.
You are correct, I'm totally confused what to do :(
Seen an example here too (but uses https://github.com/postwait/node-amqp): https://bhelx.simst.im/articles/precisely-delaying-jobs-with-dead-letter-exchanges-in-rabbitmq/
@molinto Rascal (built on top of amqp.node) can do that for you. See the advanced example. For a bit more context we use the x-message-ttl in combination with the CC routing key field to retry failed messages at 5 minute intervals. If after 10 attempts the message still hasn't succeeded we dead letter.
There's also an experimental plugin for rabbit MQ which does something similar.
Thank you
Any examples with delayed messages please?
Found this on headers: https://github.com/squaremo/amqp.node/blob/master/examples/headers.js
Good article but its in Ruby: https://www.cloudamqp.com/docs/delayed-messages.html
Thanks