[rabbitmq-discuss] List consumer connections/channels per queue
Simon MacMullen
simon at rabbitmq.com
Thu Sep 6 17:08:12 BST 2012
Yes - all names need to be URL encoded - so the vhost named "/" becomes
"%2f", e.g. you address "my queue" in "/" as "/api/%2f/my%20queue".
You'll need to do this for connection names too.
Cheers, Simon
On 06/09/2012 5:05PM, Tom Grange wrote:
> Thanks for the reply, ok that sounds like it should work, happy to use
> the HTTP API if I can.
>
> The issue with your solution is defining the ghost name as it's /
>
> for example
>
> [{"name":"/","tracing":false}]
>
> Is there a special way to define this name in the API rather than "//"
> or "///" which doesn't really make sense.
>
> Thanks
>
> Tom
>
> *Tom Grange*
> Technical Operations Engineer
> Global Personals Limited
>
> http://globalpersonals.co.uk <http://globalpersonals.co.uk/> and
> http://globaldev.co.uk <http://globaldev.co.uk/>
> Phone: 01753 757542
>
>
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>
> On Thursday, 6 September 2012 at 16:34, Simon MacMullen wrote:
>
>> I don't think it's convenient to do this from the command line, with
>> either rabbitmqctl or rabbitmqadmin, but if you are driving the HTTP API
>> directly it's easier. They key is that the HTTP API only adds consumer
>> details to a queue when retrieving a single queue, not a list (since
>> it's slightly expensive and not frequently called for).
>>
>> So GET /api/<vhost>/<queue_name>, then look in consumer_details and for
>> each item in the array there look in channel_details.connection_name and
>> DELETE /api/connections/<connection_name>.
>>
>> Cheers, Simon
>>
>> On 06/09/2012 11:05AM, Tom Grange wrote:
>>> Hi,
>>>
>>> We need to kill all the consumer connections for only one queue through
>>> rabbitmqctl (the workers themselves are already dead) - but we need to
>>> be able to list only the connections for the one queue we are
>>> interested in.
>>>
>>> Though rabbitmqctl or the api you can list the queues and list the
>>> consumer connections separately but not filter the consumer connection
>>> list down by queues.
>>>
>>> Any idea how to do this?
>>>
>>> Thanks
>>>
>>> Tom
>>>
>>>
>>> Global Personals is a limited company registered in England and Wales.
>>>
>>> Registered number: 04880697
>>>
>>> Registered office: Minton Place, Victoria Street, Windsor, Berkshire,
>>> SL4 1EG, United Kingdom
>>>
>>>
>>>
>>> _______________________________________________
>>> rabbitmq-discuss mailing list
>>> rabbitmq-discuss at lists.rabbitmq.com
>>> <mailto:rabbitmq-discuss at lists.rabbitmq.com>
>>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
> Global Personals is a limited company registered in England and Wales.
>
> Registered number: 04880697
>
> Registered office: Minton Place, Victoria Street, Windsor, Berkshire,
> SL4 1EG, United Kingdom
>
More information about the rabbitmq-discuss
mailing list