activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wxman <Mark.Fenb...@noaa.gov>
Subject Re: Persistence not working
Date Fri, 19 Feb 2010 23:26:46 GMT


bsnyder wrote:
> 
> Two points within JMS that are often confused are message durability
> and message persistence. Though they are similar, there are some
> semantic differences but each has its specific purpose. Message
> durability can only be achieved with the pub/sub domain. When clients
> connect to a topic, they can do so using a durable or a non-durable
> subscription. Consider the differences between the two:
> 
> Durable Subscription - A durable subscription is infinite. It is
> registered with the topic to tell the JMS provider to preserve the
> subscription state in the event that the subscriber disconnects. If a
> durable subscriber disconnects, the JMS provider will hold all
> messages until that subscriber connects again.
> 
> Non-Durable Subscription - A non-durable subscription is finite. It's
> subscription state is not preserved by the JMS provider in the event
> that the subscriber disconnects. If a subscriber disconnects, it
> misses all messages during the disconnection period and the JMS
> provider will not hold them.
> 
> Message persistence is independent of the message domain. Message
> persistence is a quality of service property used to indicate the JMS
> application's ability to handle missing messages in the event of a JMS
> provider failure.
> 

Ah!  Well explained!  I'm smarter now!  ;-)

But, looking at my code, it creates durable subscriptions to topics in my
*consumer* code.  There is no reference to durable messages in the producer
code.  So, am I leaving something out?  (I must be, because my app doesn't
seem to behave in the way you describe Durable Subscribers.)  Do I have to
code anything to tell ActiveMQ to keep messages (in the event a durable
subscriber is established)?

What if my app is running for the first time (and not a situation where
there was a connection, then disconnection).  In this case, is it possible
to "catch up" on older messages when the app was launched too late to
receive them when they were live?

Mark
-- 
View this message in context: http://old.nabble.com/Persistence-not-working-tp27660206p27661812.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message