It's my understanding (from what others have written on this mailing list, not from checking the code) that message expiration is checked twice: once broker-side when the message is dispatched to the consumer (or queue browser), and once client-side when the message is taken from the front of the prefetch buffer to be consumed. Both of those mechanisms rely on having a consumer, and I believe that the design decision was made to not create an additional code path that would require runtime resources and code maintenance simply to expire messages in the absence of a consumer.
Tim On Oct 22, 2018 2:11 PM, "ncasaux" <nicolas....@gmail.com> wrote: Hello, I have a configuration with one virtualtopic and three queues. I send multiples messages on the virtualtopic and they all have a expiration date. Sometime, when the queue has no consumer, the expired messages on the queue are not removed properly and remain on the queue, but this does not happen to all the queues... I don't know how to reproduce this: <http://activemq.2283324.n4.nabble.com/file/t379235/Capture.png> As you can see on the picture, the 2 queues with no consumer should have the same size, but it's not the case... The problem is that is uses a huge amount of diskspace: <http://activemq.2283324.n4.nabble.com/file/t379235/Capture2.png> As soon as I browse the queue from the webconsole, I can see that the expiration mechanism starts, and after a couple of minutes, all the expired messages are gone. Could anyone explain why this happens ? I'm using ActiveMQ 5.15.4 Thanks in advance. -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html