activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Wasilczuk <andrew.wasilc...@netdev.co.uk>
Subject Re: non-durable queues?
Date Thu, 19 Aug 2010 14:28:19 GMT
On 19/08/2010 15:13, Gary Tully wrote:
> setting a message time to live on each message, such that it will
> expire if there are no consumers:
> 
>         MessageProducer producer = session.createProducer(null);
>         long timeToLive = 2000; // in milliseconds
>         producer.setTimeToLive(timeToLive);
>         producer.send(...)


Thanks Gary, this should do the trick.


Cheers,


Andrew.

Mime
View raw message