activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <>
Subject Re: Expire Message by broker
Date Thu, 07 Nov 2013 08:38:13 GMT
Hello John,

You should either set a timeToLive on your message

or live with the fact that messages don't expire in the broker. 
There should not be a need for another broker plugin. 
If a message with a timeToLive expires, the broker will remove it. 

You could also consider using  constantPendingMessageLimitStrategy as explained in

Hope this helps.

Torsten Mielke

On Nov 6, 2013, at 14:26 PM, johnbing wrote:

> Hey,
> According to my understanding when a message is send, producer sets
> expiration time with that message, and after that time if message is not
> delivered broker expires that message.
> But when producer don't specify any "timetolive" for a message it stays
> forever in the broker.
> So I want to expire these message using broker. 
> I checked "timeStampPlugin" for above requirement but i don't want to change
> timestamp on each message according to broker's clock.
> So I am writing my own plugin for this in which i am expiring message using
> "message.setExpiration(expiration)". 
> So is this the correct way to do it ? will I face any problem if I expire
> message this way ? Is there some other way I can expire message ?
> Regards,
> JohN
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

View raw message