[rabbitmq-discuss] Pika add x-ha-policy with nodes arguments

Yu-Teh Shen shenyute at gmail.com
Sat Oct 15 07:22:25 BST 2011


Hello, I try to use HA feature with pika python client API>

But it will not success when I tried to use "nodes" instead of "all" as the
arguments in "x-ha-policy".

The code is like the following:
=======================================
    channel.queue_declare(queue="test_topic", durable=True,
                          exclusive=False, auto_delete=False,
                          arguments={'x-ha-policy': 'nodes',
'x-ha-policy-params':
                            ['rabbit at test1', 'rabbit at test2']},
                          callback=on_queue_declared)

=======================================

How do I do if I want to use "x-ha-policy" with "nodes"?

It works when I set "x-ha-policy" to "all" and I didn't use
"x-ha-policy-params" at all.

Thanks

Shen, Yu-Teh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111015/6f838b72/attachment.htm>


More information about the rabbitmq-discuss mailing list