Interface SubscriptionPositionStorageConfig.UseSubscriptionPositionInStorage

All Superinterfaces:
SubscriptionPositionStorageConfig
All Known Implementing Classes:
SubscriptionPositionStorageConfig.PersistSubscriptionPositionDuringCatchupPhase, SubscriptionPositionStorageConfig.UseOnlySubscriptionPositionInStorage
Enclosing interface:
SubscriptionPositionStorageConfig

  • Method Details

    • storage

    • andPersistSubscriptionPositionDuringCatchupPhaseWhen

      default SubscriptionPositionStorageConfig.PersistSubscriptionPositionDuringCatchupPhase andPersistSubscriptionPositionDuringCatchupPhaseWhen(Predicate<io.cloudevents.CloudEvent> persistCloudEventPositionPredicate)
      Configure the catch-up subscription to periodically store the event position in a storage in case the application is restarted during the catch-up phase. On restart the application will continue from the last stored position, instead of starting from the beginning. This is useful if you have lot's of events and don't want to risk starting from the beginning on failure!
      Parameters:
      persistCloudEventPositionPredicate - A predicate that evaluates to true if the cloud event position should be persisted for the catch-up subscription. See EveryN. Supply a predicate that always returns false to never store the position.
      Returns:
      An instance of SubscriptionPositionStorageConfig.PersistSubscriptionPositionDuringCatchupPhase
      See Also:
    • andPersistSubscriptionPositionDuringCatchupPhaseForEveryNEvents

      default SubscriptionPositionStorageConfig.PersistSubscriptionPositionDuringCatchupPhase andPersistSubscriptionPositionDuringCatchupPhaseForEveryNEvents(int persistPositionForEveryNCloudEvent)
      Configure the catch-up subscription to periodically store the event position in a storage in case the application is restarted during the catch-up phase. On restart the application will continue from the last stored position, instead of starting from the beginning. This is useful if you have lot's of events and don't want to risk starting from the beginning on failure!
      Parameters:
      persistPositionForEveryNCloudEvent - Persist the position of every N cloud event so that it's possible to avoid restarting from scratch when the catch-up subscription is restarted.
      Returns:
      An instance of SubscriptionPositionStorageConfig.PersistSubscriptionPositionDuringCatchupPhase