[rabbitmq-discuss] Age of message
cwstorm at gmail.com
Thu Mar 20 20:49:49 GMT 2014
I guess the client could include a timestamp during the publish and put it
in a header attribute. The consumer can use that information and match
that against the current date time.
You see, there could be an issue with the client not setting the
acknowledge flag so that the message can be remove from the queue. What
happens is that all other messages are back up until that one message is
acknowledge by the client. At that time, anything can happen with the
environment. The client server could be unavailable or that some other
components is working overtime which prevent the consumer service to
complete processing it correctly. If everything goes well, then the last
step is to set that flag and the message will either be acknowledge or
rejected. If rejected, it'll go back to the ready state and will process
again until it's acknowledge. So, I'm trying to come up with a good
approach on reporting "stale" messages. I could get the total messages
waiting in the queue and if it's greater than say 100, then send an alert.
But during runtime, one could get 1k messages in a queue and it just take
time to process so it's not really "stale". But I guess this would be good
for now so that support person can phyiscially monitor it.
On Thu, Mar 20, 2014 at 4:24 PM, Alvaro Videla <videlalvaro at gmail.com>wrote:
> If you are not going to process the staled messages, then if they have
> TTL set, they will be dead lettered, by setting up a queue on that
> dead letter exchange, you could then report on those "staled"
> RabbitMQ doesn't support browsing a queue and selecting message with
> certain age.
> On Thu, Mar 20, 2014 at 9:07 PM, cw storm <cwstorm at gmail.com> wrote:
> > TTL applies to expiring the message. I don't want to set an expiration
> > the message. What we're trying to do is report on stale messages.
> > to find a reasonable design or approach on this topic. Interested in how
> > everyone does it.
> > On Thu, Mar 20, 2014 at 3:54 PM, Alvaro Videla <videlalvaro at gmail.com>
> > wrote:
> >> On Thu, Mar 20, 2014 at 8:49 PM, cw storm <cwstorm at gmail.com> wrote:
> >> > We want to get an alert when messages haven't been ack since the time
> >> > arrived in the queue.
> >> I don't think RabbitMQ could give you that functionality. In any case,
> >> have you looked into TTLs? http://www.rabbitmq.com/ttl.html
> >> _______________________________________________
> >> rabbitmq-discuss mailing list
> >> rabbitmq-discuss at lists.rabbitmq.com
> >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss