Occurrent 0.6.0 is now available. It mainly focuses on reliability improvements to several components to prepare them for production use.
Specifically, all blocking subscriptions and subscription position storage modules, now have defaults to retrying failed operations to the datastore and your event handling methods.
Retries can be controlled, and disabled, when creating the component (by passing RetryStrategy.none()
to the constructor). It’s fine to disable the default retry strategy
for a subscription model and handle it in the action
(event callback) instead if you
want to make it explicit.
Changes are:
- Renamed method
shutdownSubscribers
inDurableSubscriptonModel
toshutdown
. -
Added default subscription name to subscription DSL. You can now do:
subscriptions(subscriptionModel) { subscribe<NameDefined> { e -> log.info("Hello ${e.name}") } }
The id of the subscription will be “NameDefine” (the unqualified name of the
NameDefined
class). -
Added
exists
method toEventStoreQueries
API (both blocking and reactive). This means that you can easily check if events exists, for example:val doesSomeTypeExists = eventStoreQueries.exists(type("sometype"))
- Added retry strategy support to SpringMongoSubscriptionPositionStorage. You can define your own by passing an instance of
RetryStrategy
to the constructor. By default it’ll add a retry strategy with exponential backoff starting with 100 ms and progressively go up to max 2 seconds wait time between each retry when reading/saving/deleting the subscription position. - Added retry strategy support to NativeMongoSubscriptionPositionStorage. You can define your own by passing an instance of
RetryStrategy
to the constructor. By default it’ll add a retry strategy with exponential backoff starting with 100 ms and progressively go up to max 2 seconds wait time between each retry when reading/saving/deleting the subscription position. - Added retry strategy support to SpringRedisSubscriptionPositionStorage. You can define your own by passing an instance of
RetryStrategy
to the constructor. By default it’ll add a retry strategy with exponential backoff starting with 100 ms and progressively go up to max 2 seconds wait time between each retry when reading/saving/deleting the subscription position. - Added retry strategy support to SpringMongoSubscriptionModel. You can define your own by passing an instance of
RetryStrategy
to the constructor. By default it’ll add a retry strategy with exponential backoff starting with 100 ms and progressively go up to max 2 seconds wait time between each retry when exceptions are thrown from theaction
callback (the callback that you implement to handle aCloudEvent
instance from a subscription). - All blocking subscription models will throw an
IllegalArgumentException
if a subscription is registered more than once.