<div dir="ltr">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.<div><br></div><div>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.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 20, 2014 at 4:24 PM, Alvaro Videla <span dir="ltr"><<a href="mailto:videlalvaro@gmail.com" target="_blank">videlalvaro@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you are not going to process the staled messages, then if they have<br>
TTL set, they will be dead lettered, by setting up a queue on that<br>
dead letter exchange, you could then report on those "staled"<br>
messages.<br>
<br>
RabbitMQ doesn't support browsing a queue and selecting message with<br>
certain age.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Mar 20, 2014 at 9:07 PM, cw storm <<a href="mailto:cwstorm@gmail.com">cwstorm@gmail.com</a>> wrote:<br>
> TTL applies to expiring the message. �I don't want to set an expiration on<br>
> the message. �What we're trying to do is report on stale messages. �Trying<br>
> to find a reasonable design or approach on this topic. �Interested in how<br>
> everyone does it.<br>
><br>
><br>
> On Thu, Mar 20, 2014 at 3:54 PM, Alvaro Videla <<a href="mailto:videlalvaro@gmail.com">videlalvaro@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Thu, Mar 20, 2014 at 8:49 PM, cw storm <<a href="mailto:cwstorm@gmail.com">cwstorm@gmail.com</a>> wrote:<br>
>> > We want to get an alert when messages haven't been ack since the time it<br>
>> > arrived in the queue.<br>
>><br>
>> I don't think RabbitMQ could give you that functionality. In any case,<br>
>> have you looked into TTLs? <a href="http://www.rabbitmq.com/ttl.html" target="_blank">http://www.rabbitmq.com/ttl.html</a><br>
>> _______________________________________________<br>
>> rabbitmq-discuss mailing list<br>
>> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
>> <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
> <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>