Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't declare a dead letter exchange using rabbitmqadmin

Tags:

rabbitmq

I am trying to setup a variety of exchanges and queues in RabbitMQ via a script calling rabbitmqadmin. While I can declare a queue, I am not able to find any way to send 'x-dead-letter-exchange' or 'x-dead-letter-routing-key' arguments in the declaration. Is this possible?

like image 912
John Kellar Avatar asked Dec 15 '22 22:12

John Kellar


1 Answers

Yes, this is possible by specifying JSON in 'arguments' argument:

call rabbitmqadmin.py declare queue name=MyQueue arguments={\"x-dead-letter-exchange\":\"MyExchange\",\"x-dead-letter-routing-key\":\"MyRoutingKey\"}

Note: this is except from Windows batch file. (on other OS some syntax might be different)

like image 66
Oleksii Zuiev Avatar answered Feb 13 '23 02:02

Oleksii Zuiev