activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <>
Subject Re: brand new durable subscribers AFTER messages sent to durable topic
Date Tue, 08 Apr 2008 06:43:33 GMT

On 8 Apr 2008, at 06:10, Keith Irwin wrote:

> Folks--
> If you start up various processes that use AMQ for messaging, but have
> no control over the order of how the processes are started, how do you
> make sure that durable subscribers which have not yet subscribed for
> the first time get the messages sent to a durable topic by a
> publisher?
> For instance:
>  Fresh, never-before-run AMQ starts up.
>  Process A starts up, sends 1000 messages to Topic A.
>  Process B (finally) starts, durably subscribes to Topic A.
> As far as I can tell, Process B will not get those original 1000
> messages much like I won't get a backlog of Time Magazines if I send
> in a subscription today.
> I've looked at the Retroactive Consumer page, and the Subscription
> Recovery Policy page, but I'm just not sure if the above case is
> covered.
> Is this the solution?
>  * in activemq.xml, set <fixedCountSubscriptionRecoveryPolicy
> maximumSize="10000"/> (or use one of the other options as fits other
> constraints on the system)?
>  * when I create the topic, somehow add ?consumer.retroactive=true to
> the topic name?
> I use the old JMS way of creating topics: I'm not sure if that works
> with this new ActiveMQTopic thing I've only seen just now. ;)
> Anyway, are the assumptions above about correct for this particular  
> use case?
> Keith

Hi Keith,

sorry but your case is not covered - even with retroactive consumers  
(consumer needs to exist first). You can either ensure your durable  
subscribers exist before the processes start (use JMX for example) -  
or use virtual topics - see


Rob -Enterprise Open Integration

View raw message