activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Irwin" <>
Subject brand new durable subscribers AFTER messages sent to durable topic
Date Tue, 08 Apr 2008 05:10:44 GMT

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

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

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?


View raw message