Way to get federation status for a particular exchange

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Way to get federation status for a particular exchange

Badjatya, Nikunj

Hello All,

 

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?

 

 

Thanks

Nikunj

 


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

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to get federation status for a particular exchange

Simon MacMullen-2
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!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to get federation status for a particular exchange

Badjatya, Nikunj
Thanks, Simon.

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

Is this the right syntax?

I was expecting something of the sort:

{{{
user@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@localhost.3.12017.22>">>}},
  {timestamp,{{2014,9,24},{7,23,46}}}]]
...done.
user@server:~>
}}}


Thanks
Nikunj

-----Original Message-----
From: rabbitmq-discuss [mailto:[hidden email]] On Behalf Of Simon MacMullen
Sent: Thursday, September 25, 2014 5:20 PM
To: [hidden email]
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!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
_______________________________________________
rabbitmq-discuss mailing list has moved to https://groups.google.com/forum/#!forum/rabbitmq-users,
please subscribe to the new list!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to get federation status for a particular exchange

Simon MacMullen-2
On 25/09/14 13:44, Badjatya, Nikunj wrote:
> {{{
> user@server:~> sudo rabbitmqctl eval '["MyExchange" || " MyExchange " <- rabbit_federation_status:status(),proplists:get_value(exchange, " MyExchange ") =:= <<"amq.topic">>].'
> []
> ...done.
> user@server:~>
> }}}
>
> Is this the right syntax?

No, the 'S's in the example I posted were meant literally. The only bit
you should replace is "amq.topic".

Cheers, Simon

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

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Loading...