Skip to content

Release v19.77.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 03:36
e0bb7a5

The .NET client can now record application occurrences, handle them with leased handlers, run work at application startup and shutdown, and write effect receipts atomically with the events a unit of work appends. A redelivered occurrence therefore does not repeat its Chronicle effects, and the whole flow can be specified in-process.

Added

  • Typed triggers: a record marked [Trigger("id")] is registered with its JSON payload schema, and IEventStore.Occurrences.Record(trigger, idempotencyId) records it once per idempotency id. See https://github.com/Cratis/Chronicle/blob/main/Documentation/occurrences/triggers-and-handlers.mdx. (part of #4911)
  • IOccurrenceHandler<TTrigger> handlers are discovered like reactors and run under fenced leases: the client claims due occurrences, renews the lease while the handler runs, completes or fails it, and backs off according to the kernel's retry settings. OccurrenceContext carries the occurrence id, attempt, epoch and the EffectKey to send to external systems. (part of #4911)
  • Effect receipts in the unit of work: IUnitOfWork.UseEffectReceipt(key) writes the receipt in the same storage transaction as the events, also when the unit appends no events but holds protected reads, and a repeated effect returns the stored outcome instead of appending again. Against a kernel without the effect-receipts capability the unit fails with EffectReceiptsNotSupported rather than appending without a receipt. See https://github.com/Cratis/Chronicle/blob/main/Documentation/occurrences/effect-receipts.mdx. (part of #4911)
  • Lifecycle hooks: the built-in Startup and Shutdown triggers fire once per logical activation (ChronicleOptions.ActivationId) or once per process (ActivationScope.PerProcess), for the application or for every namespace (LifecycleScope.AllNamespaces). IOccurrences.EndActivation records the shutdown of a logical activation. ASP.NET Core and generic hosts register the lifecycle service automatically. See https://github.com/Cratis/Chronicle/blob/main/Documentation/occurrences/lifecycle.mdx. (part of #4911)
  • The kernel records an all-namespaces lifecycle occurrence as a durable fan-out intent over a fixed namespace snapshot, so a crash part-way through completes after restart without duplicates. (part of #4911)
  • Testing: EventStoreForTesting and the scenarios gain Occurrences, Capabilities (current, old or unknown kernel), a deterministic ScenarioTime, a reply-dropping interceptor for commit-then-lose-the-reply cases, OccurrenceContextBuilder and OccurrenceScenario<THandler> for driving a handler step by step. See https://github.com/Cratis/Chronicle/blob/main/Documentation/occurrences/testing.mdx. (part of #4911)

Changed

  • Testing scenarios now register precise event and read-model schemas, because the in-process kernel advertises current capabilities by default. (part of #4911)
  • SQL stores get an additive event-store migration, ES-Occurrences-v19_76_0, for lifecycle fan-out intents. (part of #4911)

Fixed

  • On PostgreSQL, claiming occurrences and committing schedule turns failed with "does not support user-initiated transactions"; they now run inside the connection's retrying execution strategy. (part of #4911)