Skip to content

Release v19.94.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 23:55
2702a12

Events a C# reactor returns are now appended with idempotency keys derived from the reactor delivery, so a redelivered, caught-up or recovered delivery no longer appends its returned events twice.

Added

  • The built-in reactor side-effect handlers append returned events with an idempotency key built from the delivery identity, the reactor's effect epoch and the event's position. A key you set yourself on an EventForEventSourceId is kept. See Duplicate protection for returned events. (part of #4809)
  • [Reactor("id", effectEpoch: n)] and [Reactor("id", "sequence", effectEpoch: n)] start a new key space for a reactor whose returned output changed; ReactorDelivery.EffectEpoch exposes it. The existing constructors are unchanged. (part of #4809)
  • ReactorDelivery.IdempotencyKeyFor("effect-name") derives a stable key for an effect you append yourself. (part of #4809)
  • Cratis.Chronicle.Testing advertises idempotent appends, so scenarios using the real side-effect handlers exercise keyed appends. (part of #4809)

Changed

  • Against a kernel with idempotent appends, a reactor that returns different events for a delivery whose events are already appended now fails the partition instead of appending a duplicate. The failure message names the remedy: raise the reactor's effect epoch, or mark the handler [OnceOnly]. Build returned events from the triggering event and stable state, not from a fresh Guid or the current time. (part of #4809)
  • Against a kernel without idempotent appends, returned events are appended unkeyed as before and one warning is logged per reactor; a key the handler set itself throws IdempotentAppendsNotSupported. (part of #4809)