bunny-mock
bunny-mock copied to clipboard
implement basic dead letter exchange behaviour
I tried to implement a basic handling of dead-letter-exchanges. If a message gets nacked or rejected it could be delivered in a dead letter exchange if specified in the arguments parameter of the queue options. See here for details: http://rubybunny.info/articles/extensions.html#dead_letter_exchange_dlx
I would be glad to get some feedback on this PR cause I don't know if this is a good idea and if the code is good enough.
Coverage remained the same at 100.0% when pulling 6729e0d6dce8cf42f28a2faa5a28d8b2145695f4 on webit-de:master into 468fe867815bd86fde9797379964b7336d5bcfec on arempe93:master.
Coverage remained the same at 100.0% when pulling b53c0fd04aca095b48fd2b49b01a21c5df2c79d5 on webit-de:master into 468fe867815bd86fde9797379964b7336d5bcfec on arempe93:master.
hey @aiomaster - thanks for the PR! i'll try to take a look and merge it soon 👍
@arempe93 This would be great! I just tested it for direct exchanges with queues having a dead letter queue and the only way to get dead letters with bunny mock for now is by rejecting the message. It would need more effort to simulate a dead lettering because of message timeout. The last dead letter reason is a full queue, but this is also difficult with bunny-mock, cause you have to define what "full" means.