Repository navigation
Release v19.122.0
Reactors and reducers can now handle events in batches: the kernel delivers events to clients as pages with one result per partition, and the .NET client lets a reactor or reducer declare a batch method with [Observes<TEvent>].
Added
- Reactors can declare batch methods: a method taking an
EventBatchand marked[Observes<TEvent>]once per event type is called once per page with every event of those types, in sequence order, alongside the reactor's per-event methods. See Handling events in batches. - Reducers can declare one batch method that receives all of a partition's events and the current read model, and returns the new read model. See Reducing events in batches.
BatchContexttells a batch method where a page came from (Live,CatchUp,ReplayorRetry), which partitions it holds, its sequence range, deadline and cancellation token.- Batch methods report a single partition with
FailorDeferon theEventBatch; a deferred partition is delivered again after the given delay without being failed or counting towards quarantine. - The reactor and reducer gRPC contracts gain page delivery, observation origin and deferral, so other clients can receive pages and answer per partition. Existing clients keep receiving single-partition deliveries.
Changed
- Registration fails with a named error when an event type would reach more than one method of a reactor, when a batch method lacks
[Observes<TEvent>]or returns events, or when a reducer mixes a batch method with per-event methods.