Class DurableSubscriptionModel

java.lang.Object
org.occurrent.subscription.blocking.durable.DurableSubscriptionModel
All Implemented Interfaces:
DelegatingSubscriptionModel, PositionAwareSubscriptionModel, Subscribable, SubscriptionModel, SubscriptionModelLifeCycle

public class DurableSubscriptionModel extends Object implements PositionAwareSubscriptionModel, DelegatingSubscriptionModel
Combines a SubscriptionModel and with a SubscriptionPositionStorage to automatically persist the subscription position after each successful call to the "action" method (i.e. when the consumer in this method Subscribable.subscribe(String, Consumer) has completed successfully), thus making the subscription durable.

Note that this implementation stores the subscription position after _every_ action. If you have a lot of events and duplication is not that much of a deal, consider changing this behavior by supplying an instance of DurableSubscriptionModelConfig.