[rabbitmq-discuss] slave_pids and synchronised_slave_pids not available from the HTTP api?
Simon MacMullen
simon at rabbitmq.com
Wed Jan 4 14:00:02 GMT 2012
You have two problems.
One is that the info items are renamed to slave_nodes and
synchronised_slave_nodes by mgmt, since it tries to hide the existence
of pids.
However, the second is that rabbitmqadmin does not know how to parse /
display info items that are arrays. This probably needs fixing. You
could use the {raw|pretty}_json output formats (which do not have this
limitation) as a workaround, but ugh.
$ rabbitmqadmin -f pretty_json list queues | grep -A2 slave
"slave_nodes": [
"rabbit at smacmullen"
],
"synchronised_slave_nodes": [
"rabbit at smacmullen"
],
Cheers, Simon
On 02/01/12 19:49, Matt Pietrek wrote:
> I'm crafting some custom tooling that needs to know about the sync
> status of mirrored queues. Up to this point I've been successfully using
> the HTTP API via the rabbitmqadmin module and been able to get
> everything I need . However, I'm stymied on slave_pids and
> synchronised_slave_pids, which don't seem to come through.
>
> Per the rabbitmqctl cmd-line help, slave_pid and synchronised_slave_pids
> are valid queueinfoitems. Up to this point, queueinfoitem names have
> worked equally well with "rabbitmqadmin list queues"
>
> I've simplified the repro case down to the following; Rabbitmqctl
> displays these fields as expected:
>
> mpietrek at play:~/work/$rabbitmqctl list_queues consumers messages name
> slave_pids synchronised_slave_pids
> Listing queues ...
> 00fake_munger_queue[<rabbit at play2.1.248.0>][<rabbit at play2.1.248.0>]
> 00fake_service_2[<rabbit at play2.1.250.0>][<rabbit at play2.1.250.0>]
> ...done.
>
>
> However, rabbitmqadmin doesn't:
>
> mpietrek at play:~/work/$rabbitmqadmin.py list queues consumers messages
> name slave_pids synchronised_slave_pids
> +-----------+----------+----------------------+------------+-------------------------+
> | consumers | messages | name | slave_pids | synchronised_slave_pids |
> +-----------+----------+----------------------+------------+-------------------------+
> | 0 | 0 | fake_munger_queue | | |
> | 0 | 0 | fake_service_2 | | |
> +-----------+----------+----------------------+------------+-------------------------+
>
> Is this normal/expected? Am I not understanding something?
>
> FWIW, this is using RabbitMQ 2.71 on Ubuntu 10.04.
>
> Thanks,
>
> Matt
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list