activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From himmeric <>
Subject Recovery Policies should apply between broker restart
Date Mon, 24 Jul 2006 20:31:18 GMT

I discussed this a while back on IRC with Hiram and a few others.

Basically I need to have Subscription Recovery Policies work between broker
restarts for non durable subscribers and NON_PERSISTENT messages on topics. 
So the use case would looks something like this:

topic://FOO.X is configured with LastImageRecoveryPolicy

Msg 1 published on topic://FOO.X
Consumer A joins and receives Msg 1 (since he is consumer.retroactive=true)
Broker stops and restarts
Consumer B joins before additional messages published to topic://FOO.X
Consumer B receives Msg 1 on topic://FOO.X

I'm not sure the best way to achieve this.  I played with having a durable
root consumer that would only acknowlege() messages if they weren't found in
the recovery policy.  Then the recovery process would be for this durable
consumer to replay messages to the recovery policy on a restart.  Obviously
this is quite a hack and I didn't get it working because I don't think I
actually had the Topic's real RecoveryPolicy object (appears the
PolicyEntry.getSubscriptionRecoveryPolicy() returned a copy).

I think we need to make sure if a message is referenced by a recovery policy
it needs to be persisted even if it's not persistent.  And then second
replay these messages somehow on restart.

I'd actually be happy if I could get this working with just the
LastImageRecoveryPolicy as it's the only one I'm using at this point.  But a
more generic solution would be good too.

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message