activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Arcuri <arcur...@gmail.com>
Subject Durable Topic, only most-recent message needed
Date Thu, 02 May 2013 09:24:00 GMT
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: http://activemq.2283324.n4.nabble.com/Durable-Topic-only-most-recent-message-needed-tp4666565.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message