Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do use RabbitMQ policies to set an exchange as durable

Tags:

rabbitmq

Using RabbitMQ, how do I create a policy that will make an existing exchange durable? At this point, I believe I have to delete the exchange and then declare it again setting durable:true.

Secondary related question: Could a policy be created to set durable:true for declared exchanges even if the client didn't specify that parameter?

like image 514
MADCookie Avatar asked Sep 20 '25 10:09

MADCookie


1 Answers

To change the durability setting of an existing exchange or queue, you'll have to delete and re-declare.

Policies can be used for setting optional arguments only; they can't be used to force the durable:true since durable is a mandatory argument.

like image 176
M.A. Hanin Avatar answered Sep 23 '25 20:09

M.A. Hanin