Rabbitmq Ha Json Decoding Error

523 views
Skip to first unread message

Muhammet Parlak

unread,
Aug 12, 2015, 2:18:58 AM8/12/15
to rabbitmq-users
Hi,

I'm configuring Highly Available Queues on Windows Server. when I run (rabbitmqctl set_policy ha-two "^two\." ^
   "{""ha-mode"":""exactly"",""ha-params"":2,"ha-sync-mode":"automatic"}"),I receive an JSON decoding error.What should I do in this situation?

Michael Klishin

unread,
Aug 12, 2015, 3:42:43 AM8/12/15
to rabbitm...@googlegroups.com, Muhammet Parlak
You use double quotes inside double quotes. I suspect that
""ha-params"" is meant to be "ha-params", too. So, either use
single outer quotes, e.g.

'{"ha-mode":"exactly", "ha-params":2, "ha-sync-mode":"automatic"}'

or escape the nested ones:

"{\"ha-mode\":\"exactly\", \"ha-params\":2, \"ha-sync-mode\":\"automatic\"}"
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Message has been deleted

Muhammet Parlak

unread,
Aug 12, 2015, 3:54:37 AM8/12/15
to rabbitmq-users
Ok, ıt was when I used that "{\"ha-mode\":\"exactly\", \"ha-params\":2, \"ha-sync-mode\":\"automatic\"}"

        Thanks a lot. 
Reply all
Reply to author
Forward
0 new messages