Skip to content

Release v3.11.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 11:24
08506dd

The Elixir client moves closer to the .NET client: richer event contexts and append results, typed event reads, child collections in projections, replay control for reactors, closing events, middleware, read model reactors and operational tooling for recovering and watching observers.

Added

  • Chronicle.Events.EventContext, shared by reactors and reducers: the causing identity (caused_by, with on_behalf_of), causation, correlation_id, tags, hash, subject, event type, event stream and replaying?. It is still a map, so existing pattern matches keep working. (#125)
  • delivery_id in the reactor context: a stable identity of one delivery of an event to a reactor, the same on every redelivery, built like the .NET ReactorDelivery.Id for idempotency keys. (#137)
  • Reactor replay control: once_only: true registers a reactor as not replayable, once_only: [Event] skips those events while replaying, and an optional handle_replay/2 handles replayed events. (#136)
  • get_for_event_source/3 and get_from_sequence_number/2 accept decode: true and return Chronicle.Events.AppendedEvent structs holding the event struct, its context, the raw payload and redaction details. (#130)
  • append_with_result/3 and append_many_with_result/3 return the assigned sequence numbers and structured constraint and concurrency violations, plus wait_for_completion/2. (part of #133)
  • ConcurrencyScope.expecting_no_matching_event/1 for creation-only guards. (part of #134)
  • Chronicle.Compliance.allow_new_encryption_key_for/2. (part of #135)
  • Event type options subject:, tags:, tombstone:, public: and compensation_for:; the declared subject is resolved on append. (part of #138) (part of #146)
  • children blocks in read models and projections for child collections (nested, with from, join, removed_with), and clear: to set a scalar back to no value. (part of #127)
  • closes_stream declarations on event types, unique constraint mode: :per_value, and Chronicle.EventSequences.Streams to list, close, reopen and check closed stream scopes, read event metadata and verify stored content. (part of #142) (part of #143)
  • Chronicle.ReadModels.query/2 options :filter and :sort, evaluated by the client with a :max_scan limit. (part of #126)
  • Chronicle.ReadModels.observe/2 for collections and Chronicle.ReadModels.Reactor for reacting to read model changes. (part of #144)
  • Chronicle.Middleware for reactors and reducers, configured globally or per module. (part of #145)
  • Chronicle.Observers.retry_partition/3, clear_partition_quarantine/3 and clear_observer_quarantine/2. (part of #141)
  • Chronicle.Client.registration_status/1, await_registration/2 and a :registration option for backoff, jitter and maximum attempts; an invalid definition now fails once instead of retrying forever. (part of #131)
  • Operations: observer_lag: publishes a [:chronicle, :observer, :lag] telemetry event per observer, and watchdog: reconnects a client stuck short of registered. (part of #132)
  • A client-side payload guard returning {:error, {:payload_too_large, size, limit}}, configurable with max_payload_bytes. (part of #129)
  • Documentation for all of the above and a Limits and gaps page covering kernel limits and consistency guarantees. (part of #151)

Changed

  • Seeding now goes through the kernel's seeding service: entries added to an event source that was seeded before are applied, applied entries are not repeated, global entries reach every namespace the kernel knows, event tags are sent, and a seeder that raises contributes none of its entries. (#139)
  • After an Unauthenticated response the client fetches a new token and repeats the call once, and every reconnect starts from a fresh token. (part of #132)
  • A connection to a remote host that skips TLS validation logs a warning at startup. (part of #151)

Fixed

  • A map field such as parameters: %{} is registered as an object, with its keys kept as written, instead of as a string that failed schema validation. (#123)
  • Nested struct fields with multi-word names are written in camelCase at every depth, matching the schema, so they are no longer dropped. (#124)
  • :occurred in projections maps to the event's occurred time instead of the $occurred expression the kernel rejects. (part of #128)
  • A reducer whose read model exceeds the message limit reports a failed reduction instead of breaking the connection. (part of #129)
  • complete_stream reads the kernel's response correctly. (part of #142)