You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by andy95014 <an...@gmail.com> on 2010/07/31 07:39:45 UTC

Enable durable subscribers to receive previously published msgs

I try to use ActiveMQ in a cloud computing environment. All consumers are
durable, since they could not afford to miss any msgs. The challenge is to
ensure durable consumers to receive previously published msgs.

Let's say that a persistent msg M arrives for a brand new topic T, and we
don't have any durable subscribers for T at that point. I need to make sure
that such a msg M will be reliablly delivered to future subscribers, even if
those subscribers show up after restart of AQ broker.

Thanks in advance for any suggestions. 
-- 
View this message in context: http://old.nabble.com/Enable-durable-subscribers-to-receive-previously-published-msgs-tp29311406p29311406.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Enable durable subscribers to receive previously published msgs

Posted by andy95014 <an...@gmail.com>.
I did try to modify broker.region.Topic to force the msgs to be stored even
if there are no durable subscribers (via canOptimizeOutPersistence()). After
the broker was restarted, I could not get those old msgs to be delivered to
new subscribers. 

-- 
View this message in context: http://old.nabble.com/Enable-durable-subscribers-to-receive-previously-published-msgs-tp29311406p29311407.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Enable durable subscribers to receive previously published msgs

Posted by cobrien <cl...@ttmsolutions.com>.
Hi,You explained it clearly but I will recap just to be sure. You have the
following sequence of events.

1) create Topic.
2) persistent messages arrive in Topic.
3) ActiveMQ is bounced.
4) Durable subscriber subscribes to topic.

I am assuming you are installing on cloud images (called AMI for Amazon) 
and these images are dynamically created and deleted at runtime. 

This is not a trivial problem but here is an idea:

I would configure a network of brokers with one ActiveMQ Broker deployed on
an always-on image (AMI) acting as a proxy and SAF agent. 
On this proxy set dynamicOnly and a low prefetch size to make sure the
consumer is active on the image broker  when the message is forwarded. 



-Clark

www.ttmsolutions.com 
ActiveMQ reference guide at 
http://bit.ly/AMQRefGuide










andy95014 wrote:
> 
> Retroactive is only applied to non-durable subscription. The messages will
> thus be lost when the broker is restarted.
> 
> I'm trying to use ActiveMQ to feed messages into my nodes in cloud.
> 
> Andy
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Enable-durable-subscribers-to-receive-previously-published-msgs-tp29311406p29315808.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Enable durable subscribers to receive previously published msgs

Posted by andy95014 <an...@gmail.com>.
Retroactive is only applied to non-durable subscription. The messages will
thus be lost when the broker is restarted.

I'm trying to use ActiveMQ to feed messages into my nodes in cloud.

Andy


-- 
View this message in context: http://old.nabble.com/Enable-durable-subscribers-to-receive-previously-published-msgs-tp29311406p29315220.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Enable durable subscribers to receive previously published msgs

Posted by cobrien <cl...@ttmsolutions.com>.
Hi,
The functionality you are describing is handled by a Retroactive Consumer
and governed by Subscription Recovery Policy. You can read about these
features at the links below. Be sure to read the limitations of retroactive
consumers. 

http://activemq.apache.org/retroactive-consumer.html
http://activemq.apache.org/subscription-recovery-policy.html

Clark 
PS
Great to hear ActiveMQ is being used in the cloud!  Would love to hear if
you are scaling ActiveMQ across images or using ActiveMQ as a cloud entry
point. 



www.ttmsolutions.com 
ActiveMQ reference guide at 
http://bit.ly/AMQRefGuide


andy95014 wrote:
> 
> I try to use ActiveMQ in a cloud computing environment. All consumers are
> durable, since they could not afford to miss any msgs. The challenge is to
> ensure durable consumers to receive previously published msgs.
> 
> Let's say that a persistent msg M arrives for a brand new topic T, and we
> don't have any durable subscribers for T at that point. I need to make
> sure that such a msg M will be reliablly delivered to future subscribers,
> even if those subscribers show up after restart of AQ broker.
> 
> Thanks in advance for any suggestions. 
> 

-- 
View this message in context: http://old.nabble.com/Enable-durable-subscribers-to-receive-previously-published-msgs-tp29311406p29315174.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.