Sending the last message to new clients on connection with ActiveMQ

23 views
Skip to first unread message

Ben Poor

unread,
Sep 13, 2010, 9:13:42 AM9/13/10
to radiovis-...@googlegroups.com
Or as I was going to write: ActiveMQ Retroactive Flag

Some of you may be interested that an issue has been submitted to the ActiveMQ project, along with a suggested patch, covering how to easily setup the system in order to send messages to clients immediately upon connect:


The idea with this issue is that you can configure the system on a per topic basis in order to automatically set the 'retroactive' flag for clients.

<policyEntry topic=">" producerFlowControl="true" alwaysRetroactive="true" memoryLimit="1mb">
  <subscriptionRecoveryPolicy>
     <lastImageSubscriptionRecoveryPolicy />
  </subscriptionRecoveryPolicy>
</policyEntry>

If the alwaysRetroactive flag is set to true, then any new clients will get the last sent message as soon as they connect.
For those brave enough, they can download the 5.5 SNAPSHOT release and make the changes via the patch attached to the issue. For those not versed in such matters, either find a friend who is, or you can gently encourage the ActiveMQ team to add this to the 5.5 release. Based on my experience of adding the 'anonymous' flag, they are pretty good at appreciating new features that users want.

Thanks,
Ben Poor
ben....@radiodns.org
Reply all
Reply to author
Forward
0 new messages