[rabbitmq-discuss] Way to get federation status for a particular exchange

Badjatya, Nikunj Nikunj.Badjatya at emc.com
Thu Sep 25 13:44:11 BST 2014


Thanks, Simon.

{{{
user at server:~> sudo rabbitmqctl eval '["MyExchange" || " MyExchange " <- rabbit_federation_status:status(),proplists:get_value(exchange, " MyExchange ") =:= <<"amq.topic">>].'
[]
...done.
user at server:~>
}}}

Is this the right syntax?

I was expecting something of the sort:

{{{
user at server:~> sudo rabbitmqctl eval 'rabbit_federation_status:status().'
...
...
 [{exchange,<<"MyExchange">>},
  {vhost,<<"/">>},
  {connection,<<"myupstream">>},
  {uri,<<"amqp://128.221.252.65">>},
  {upstream_exchange,<<"MyExchange">>},
  {status,{running,<<"<rabbit at localhost.3.12017.22>">>}},
  {timestamp,{{2014,9,24},{7,23,46}}}]]
...done.
user at server:~>
}}}


Thanks
Nikunj

-----Original Message-----
From: rabbitmq-discuss [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Simon MacMullen
Sent: Thursday, September 25, 2014 5:20 PM
To: rabbitmq-users at googlegroups.com
Cc: Legacy list about RabbitMQ
Subject: Re: [rabbitmq-discuss] Way to get federation status for a particular exchange

On 25/09/14 06:34, Badjatya, Nikunj wrote:
> Hello All,

Hi. NB: this list is going away soon, redirecting to the new list.

> Is there a way to get federation status for a particular exchange?
>
> The command "*rabbitmqctl eval 'rabbit_federation_status:status().'*"
> gives information of available exchanges and queues. Is it possible to 
> get information of only one exchange of interest?

You can filter the list returned by rabbit_federation_status:status() with something like:

$ rabbitmqctl eval '[S || S <- rabbit_federation_status:status(),
proplists:get_value(exchange, S) =:= <<"amq.topic">>].'

Obviously you can use this to filter on other keys too.

Cheers, Simon
_______________________________________________
rabbitmq-discuss mailing list has moved to https://groups.google.com/forum/#!forum/rabbitmq-users,
please subscribe to the new list!

rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list