This content has been marked as final. Show 1 reply
Sorry for not getting back sooner on this. Right now there is no configuration knob
to do this, although procedurally it would not be difficult to implement. Probably it
would be best done in the PublishingService which would know if a target cluster is
currently not available and could constantly trim the message queue if it got too large.
If this is the policy for all published caches the fix should be straight forward.
If you look at the code in CoherencePublishingService, you will see an exception block
at the bottom of onPublish() which handles the situation where a publisher failed.
In it, probably in code that would otherwise suspend, you can put in trim logic to
figure out how much is backlogged in the message queue, and optionally throw messages
away (much in the same way as would be done if they had successfully been sent.)
This model has some serious shortcomings in that both source and target can permantently
diverge in state.