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 <[email protected]> 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

Reply via email to