Thanks for the follow up James. I took a stab at implementing a new custom recovery policy PersistentLastImageSubscriptionRecoveryPolicy.
I think I have the logic basically implemented, but have a few implementation questions. I guess the first issue is what components should i be leveraging to take advantadge of the fact I'm wired up internally to ActiveMQ. Currently I'm using a normal connection acquired through ActiveMQConnectionFactory with a uri of vm://brokerName Not sure this is optimal. I'm attempting to use one connection per broker via my own Singleton connection manager. I ended up with a lazy initialization of my recovery policy, since I need the broker name and topic name which are only acquired through the add(), recover() or browse() methods. I think this laziness is desired. So I basically followed the approach you laid out and think I'm close to functional. I do have one critical problem still and that's that my createDurableTopicSubscriber call is blocking and not returning. I suspect this is some kind of synchronization problem. Recall my comment on lazy initialization, so the createDurableSubscriber for the recovery policy is created when an add() or recover() are called either from a producer sending a message or a consumer joining. It looks like the createDurableTopicSubscriber call is blocking which prevents the add() or recover() from completing which then blocks the end publisher (if not async) and/or new consumer. I've noticed if I hard code an alternate topic the durableTopicSubscriber starts up fine, but obviously that won't work b/c the policy will contain the wrong messages. This is why I suspect some synchronization problem between the topic send() or add publisher and the recovery policy startup. I'm attaching my code, please excuse the mess, been chasing my tail in here trying to sort this out. http://www.nabble.com/user-files/157/persist-last.zip persist-last.zip <subscriptionRecoveryPolicy> <com.himmeric.activemq.persist.PersistentLastImageSubscriptionRecoveryPolicy /> </subscriptionRecoveryPolicy> Any ideas? -- View this message in context: http://www.nabble.com/Re%3A-Recovery-Policies-should-apply-between-broker-restart-tf1996384.html#a5566195 Sent from the ActiveMQ - Dev forum at Nabble.com.