activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: Messages are not discarded from queue when they're expired.
Date Fri, 21 Jul 2017 13:42:05 GMT
When you say the messages "are indeed purged," do you mean to say (in more
words, to make sure we're clear) "When I reconnect my consumer that has
been offline for longer than the TTL I set, all messages older than the TTL
are expired (as confirmed by an increase in the ExpiredCount JMX attribute
on the queue in question or by some similar mechanism)"?

For your second test scenario (10000 messages, consumer connected all the
time), what about your test procedure causes them to be clearly pending for
more than half a second? Are you saying you're publishing messages far
faster than your consumer can process them and therefore there's a large
backlog? How are you determining that message expiration isn't happening?
With this scenario, message expiration could be taking place on either the
broker or the consumer, so to get a count of expired messages you have to
sum together the count from JMX for the broker plus the number of expired
messages listed in the consumer logs (which is only written every 1000
expired messages, if I remember correctly). But I would expect that 1/2
second after your last message is produced, your consumer would receive no
further messages to process.

One other question: are the clocks synchronized on whatever machines are
running your producers, consumers, and brokers? If not, that could explain
the behavior you're seeing.

Tim

On Fri, Jul 21, 2017 at 3:10 AM, jbar <jan3k24@gmail.com> wrote:

> Thank you for your response.
>
> The messages are indeed purged when I reconnect my customer, however I
> observed the same behaviour testing one that doesn't set any TTL. When
> trying the mechanism "in action" with 10 000 messages and their TTL = 500
> ms
> (and consumer connected all the time), all of them get dequeued and
> delivered to the consumer, despite clearly being pending for more than only
> 0,5 s.
> Am I missing something? Maybe there're some files other than activemq.xml
> that I should take a look at?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/ActiveMQ-Messages-are-not-discarded-from-queue-
> when-they-re-expired-tp4728731p4728760.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message