[rabbitmq-discuss] how to apply more than one policy to the same queue

Simon MacMullen simon at rabbitmq.com
Sun Oct 13 15:55:21 BST 2013


On 12/10/2013 4:47AM, Alvaro Videla wrote:
> Hi,
>
> I'm trying to apply more than one policy to the same queue with no
> success. Is that possible?

No. Each exchange / queue will have at most one policy applied to it. 
Otherwise, if two policies applied to one object and they contradicted 
each other, the outcome would be unclear and difficult to visualise. So 
the highest priority wins, and if there are multiple policies with the 
same priority that could apply then one is chosen arbitrarily.

If you want to define both HAness and federatedness for a queue, you can 
do it in one policy like:

$ rabbitmqctl set_policy fed-ha '^test\.' 
'{"federation-upstream-set":"all","ha-mode":"all"}'

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list