arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
277 stars 129 forks source link

deadLetter #92

Closed TimBailey-pnk closed 6 years ago

TimBailey-pnk commented 7 years ago

Hi, when using the deadletter option on a rabbot.addQueue call, should I expect the exchange to be created? It doesnt seem to, so if I manually create it and bind it to a queue, I still never see any messages arriving in my dl queue. Any suggestions?

arobson commented 6 years ago

@TimBailey-pnk - Hi Tim - that's right, it will not create an exchange on your behalf. There are a ton of options available in having a dlx, dlq and bindings for them and I don't care to put default systems in place for those in rabbot as it'd become a very large set of new responsibilities to implement, test, document, re-assert under several failure modes and then explain because overriding defaults has tripped up a lot of folks.

DLX/DLQs tend to be specific enough to particular use cases that I recommend just adding them to your configuration blocks. They work like any other exchange, queue and binding set, you just need to use the exchange name in the deadletter setting for another queue. I also recommend making sure you've thought to set subscribe: true on the queue(s) bound to a DLX.

Here's some of the related docs: