0

Is there a way in EasyNetQ to set the routing key [x-dead-letter-routing-key] argument when creating a Queue? (as far as I can see you can only set a DeadLetterExchange.)

IQueue updateCacheQueue = advancedBus.QueueDeclare(name: "UpdateCache", deadLetterExchange: "UpdatesDeadLetter");
Joel Weiss
  • 136
  • 8

2 Answers2

0

RabbitMQ assumes that exchanges are superior to queues. You can create an exchange that delivers to exactly one queue, and thus your DLQ addressing issue is solved. Should you decide you need to take additional actions in the future (e.g. store the message for potential reprocessing AND ALSO alert operations via email), you can do that in the exchange without mucking up the queue processor.

PaulProgrammer
  • 16,175
  • 4
  • 39
  • 56
  • So for every queue you have, you have to add an exchange and queue to serve as a DLQ, kind of doesn't make sense. No? – Joel Weiss Jan 26 '15 at 20:51
  • Meh. Neither does having to create a message consumer to reroute traffic if you need a second action on a DLQ. Pay now or pay later. – PaulProgrammer Jan 27 '15 at 01:11
  • you can have just one exchange and queue to server as DLQ for your queues, no need to create one for every queue. Not sure that's what you want tho – old_sound Jan 28 '15 at 14:52
0

I Added another parameter to the QueueDeclare method and created a pull request, and you can set it after version 0.40.6.355

Joel Weiss
  • 136
  • 8