Open aiomaster opened 7 years ago
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.
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.