activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yin Wang <>
Subject Re: Durable Topic, only most-recent message needed
Date Thu, 02 May 2013 12:12:36 GMT
The non-durable retroactive consumer of Topic will do the trick.
Only one condition is not satisfied,messages can not survive from the
restart of the broker.

2013/5/2 Andrea Arcuri <>

> Hi,
>   I am new to ActiveMQ. Reading documentation and playing with examples.
> But
> there is a key scenario I need to implement, but not sure if ActiveMQ can
> support it, and, if it does, how.
> - Client publishes topic to broker
> - Only most recent message on topic is needed
> - Messages can be very large (in the order of megabytes), so shouldn't
> store
> on disk any old message that is not needed any more. but need persistency
> in
> case producer/embedded broker process is restarted
> - At the time the producer does publish a message on topic, there might be
> no consumer in the network yet. Consumers might appear hours/days later,
> and
> should pick up (for performance reasons) automatically only the most recent
> message, as the previous ones are not needed
> - the producer might publish 1-4 messages a day, but there might be periods
> of few days with 0 messages. there is only one producer, but an unknown,
> unpredictable, dynamic number of consumers
> On a MessageProducer, I guess I can set a
> setDeliveryMode(DeliveryMode.PERSISTENT) and a very high value for
> setTimeToLive (e.g., a month/year). But how to tell ActiveMQ that, once a
> new message on a topic is published, then all the previous ones are
> obsolete
> and should be removed/not sent?  Does ActiveMQ support such kind of
> functionality?
> many thanks
> Andrea
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message