[rabbitmq-discuss] Queue Lease (x-expires)

Yogesh Ketkar yogimogi at gmail.com
Sun Jan 22 07:40:03 GMT 2012


Thanks Steve and Simon.

I checked that rabbitmqadmin.py uses http calls (RESTful APIs)
provided by RabbitMQ to perform the operations.
Can you provide me a sample
- (either using rabbitmqadmin or using RESTful client) to delete a
queue say "Yogesh" with isEmpty and isUnused flags set to True?
  I could delete the queue using DELETE http request on
http://localhost:55672/api/queues/%2f/Yogesh
  But couldn't figure out a way to specify isEmpty and isUnused flags.
- I was able to do this in a Java client using interface
com.rabbitmq.client.Channel { queueDelete("Yogesh", true, true) }.
  But then, how do I get list of queues using com.rabbitmq.client?

regards, Yogesh



On Jan 20, 7:25 pm, Steve Powell <st... at rabbitmq.com> wrote:
> Just a thought,
>
> If you go the way Simon says and have something from outside poking the mgmt API
> every few minutes, make sure you issue queueDelete with the if-empty bit set.
> There is a window between the poking and the deleting in which messages may
> arrive on the queue (i.e. it's not idle anymore), and it may even not be in-use
> (have consumers) by the time you get to it.
>
> Steve Powell
> st... at rabbitmq.com
> [wrk:+44-2380-111-528begin_of_the_skype_highlighting            +44-2380-111-528      ] [mob:+44-7815-838-558begin_of_the_skype_highlighting            +44-7815-838-558      ]
>
> On 20 Jan 2012, at 12:47, Simon MacMullen wrote:
>
>
>
>
>
>
>
> > On 16/01/12 15:56, Yogesh Ketkar wrote:
> >> I would like to delete the queue with no messages in it and so asked
> >> the question.
>
> > I see.
>
> >> Can you suggest an alternative to achieve
> >> 1. Delete the queue when last event processed from the queue has
> >> <Action>Delete</Action>  as this implies that
> >>    no more events with same<AppId>  would ever get created.
>
> > Well, you could have your client do that.
>
> >> 2. Delete the queue when it is IDLE for certain period, meaning it is
> >> empty and no more event was added to it for certain time period.
>
> > Hmm. Well there's nothing built in to do this, but you could have something from outside poking the mgmt API every few minutes - look at the output of (e.g.)
>
> > rabbitmqadmin list queues name messages consumers idle_since
>
> > Cheers, Simon
>
> > --
> > Simon MacMullen
> > RabbitMQ, VMware
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list