activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: non-durable queues?
Date Thu, 19 Aug 2010 14:13:13 GMT
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(...)

On 19 August 2010 14:50, Andrew Wasilczuk <andrew.wasilczuk@netdev.co.uk> wrote:
> Hi there,
>
>
> Is it possible to have a non-durable queue in ActiveMQ?  The desired
> behaviour I'm looking for is to deliver the message only when there's an
> active subscriber on the queue.  If there isn't one, the message should
> be discarded.
>
> Is this possible? If so, how do I go about setting it up?
>
>
>
> Many thanks,
>
>
> Andrew.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
View raw message