[rabbitmq-discuss] Messages Timeout in Queue
gaganarora.itm at gmail.com
Sat Jul 4 20:28:02 BST 2009
My system is similar to an IM system and is using RabbitMQ for presence
updates and have designed it in such a way that a consumer subscribes to a
queue only when it comes online.Now the issue is as stated by you there will
be a large no of messages ready to be deleivered when a user comes online.
Checking timestamp for each message will result in high cost.
There can be a solution in which a message can be published using immediate
flag. But it is desired by consumer to get all messages which are less than
1 minute old.
Can you suggest some other solution for achieving this?
On Sat, Jul 4, 2009 at 3:32 PM, Alexis Richardson <
alexis.richardson at gmail.com> wrote:
> On Fri, Jul 3, 2009 at 5:08 PM, GAGAN ARORA<gaganarora.itm at gmail.com>
> > Hi Alexis
> > The problem statement here is I dont want my messages in queue for more
> > 1 minute.
> The easiest way to do this is for the client to keep consuming the
> messages from the queue.
> However: presumably you want messages to be ignored in the case where
> (a) there is no consumer to get the messages from the queue; and (b)
> the messages are more than one minute old.
> If so then: Have you considered putting a timestamp on the messages?
> That way, when a consumer starts taking messages from the queue, it
> can simply check the timestamps and throw away anything 'old'. This
> solution works just fine when (i) you don't need real time accuracy
> ie. "about a minute" is just as good as "exactly a minute", and
> provided that (ii) there aren't too many messages to throw away.
> Judging by the document that you sent, both (i) and (ii) are true.
> Does this help?
> > I have tried expiration property while publishing a message but
> > later came to know that it is still not implemented. Can you help me out
> > figuring some alternate approach?
> > Thanks
> > Gagan Arora
> > On Fri, Jul 3, 2009 at 8:17 PM, Alexis Richardson
> > <alexis.richardson at gmail.com> wrote:
> >> Gagan,
> >> On Fri, Jul 3, 2009 at 3:10 PM, GAGAN ARORA<gaganarora.itm at gmail.com>
> >> wrote:
> >> > Hi
> >> > Is it possible to set message time out in Java client API, so that
> >> > messages
> >> > drop out from queue after some interval of time if nobody consumes
> >> Not yet but this is a feature have been asking for quite a bit. It's
> >> on our roadmap.
> >> There may be other ways to achieve what you want.
> >> alexis
> >> > Thanks
> >> > Gagan Arora
> >> > _______________________________________________
> >> > rabbitmq-discuss mailing list
> >> > rabbitmq-discuss at lists.rabbitmq.com
> >> > http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >> >
> >> >
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss