You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "hashutosh@apache.org" <ha...@apache.org> on 2011/04/07 00:00:10 UTC

Browsing messages published before subscribing to a topic.

I can become durable subscriber and I am guaranteed to be delivered all the
messages from that time on, even if I loose connection and reconnect.
Question however I have is it possible to get messages which were published
even before I subscribed to that topic. 
Another way to state is:
1) At time T0, topic P1 is created.
2) At T1, message M1 is published on P1.
3) At T2, subscriber S1 subscribes to P1.
4) At T3, message M2 is published on P1.

In above scenario, it is guaranteed durable S1 will receive all the messages
from M2 onwards, even if it disconnects and reconnects. What I am interested
in is whether its possible for S1 to get M1. If yes, whats the api? Also,
what does JMS standard says for this usecase?

Thanks,
Ashutosh

--
View this message in context: http://activemq.2283324.n4.nabble.com/Browsing-messages-published-before-subscribing-to-a-topic-tp3431932p3431932.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Browsing messages published before subscribing to a topic.

Posted by Dejan Bosanac <de...@nighttale.net>.
Checkout  http://activemq.apache.org/subscription-recovery-policy.html

<http://activemq.apache.org/subscription-recovery-policy.html>
Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net

Connect at CamelOne <http://camelone.com/> May 24-26

The Open Source Integration Conference



On Thu, Apr 7, 2011 at 12:00 AM, hashutosh@apache.org
<ha...@apache.org>wrote:

> I can become durable subscriber and I am guaranteed to be delivered all the
> messages from that time on, even if I loose connection and reconnect.
> Question however I have is it possible to get messages which were published
> even before I subscribed to that topic.
> Another way to state is:
> 1) At time T0, topic P1 is created.
> 2) At T1, message M1 is published on P1.
> 3) At T2, subscriber S1 subscribes to P1.
> 4) At T3, message M2 is published on P1.
>
> In above scenario, it is guaranteed durable S1 will receive all the
> messages
> from M2 onwards, even if it disconnects and reconnects. What I am
> interested
> in is whether its possible for S1 to get M1. If yes, whats the api? Also,
> what does JMS standard says for this usecase?
>
> Thanks,
> Ashutosh
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Browsing-messages-published-before-subscribing-to-a-topic-tp3431932p3431932.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>