[rabbitmq-discuss] Queue Lease (x-expires)
Yogesh Ketkar
yogimogi at gmail.com
Mon Jan 16 15:56:30 GMT 2012
Thanks Simon for the response.
This is what I am trying to achieve.
I am going to get events from an external system on RabbitMQ queue.
Event payload looks something like
Payload-1
<Info>
<AppId>10</AppId>
<Action>Create</Action>
</Info>
Payload-2
<Info>
<AppId>10</AppId>
<Action>Delete</Action>
</Info>
Payload-3
<Info>
<AppId>11</AppId>
<Action>Create</Action>
</Info>
Events which have same AppId have to be processed sequentially. So I
was planning to have just one consumer on this queue, this consumer
will create queues on the fly with names like AppId-10, AppId-10 etc
and move those corresponding events to those queues. Each of these
queues will have only one consumer so as to guarantee sequential
processing of the events.
There could be thousands of queues which would get created, each with
probably on 10 to 20 messages.
I would like to delete the queue with no messages in it and so asked
the question.
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.
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.
regards, Yogesh
On Jan 16, 8:26 pm, Simon MacMullen <si... at rabbitmq.com> wrote:
> On 16/01/12 07:15, Yogesh Ketkar wrote:
>
> > Is there a way to ensure that queue with x-expires option set, in
> > addition to not being unused, will not get deleted if there is at-
> > least one message on the queue?
>
> I'm afraid not. What are you trying to do?
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> 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