Repository navigation
Release v3.11.0
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, withon_behalf_of),causation,correlation_id,tags,hash,subject, event type, event stream andreplaying?. It is still a map, so existing pattern matches keep working. (#125)delivery_idin the reactor context: a stable identity of one delivery of an event to a reactor, the same on every redelivery, built like the .NETReactorDelivery.Idfor idempotency keys. (#137)- Reactor replay control:
once_only: trueregisters a reactor as not replayable,once_only: [Event]skips those events while replaying, and an optionalhandle_replay/2handles replayed events. (#136) get_for_event_source/3andget_from_sequence_number/2acceptdecode: trueand returnChronicle.Events.AppendedEventstructs holding the event struct, its context, the raw payload and redaction details. (#130)append_with_result/3andappend_many_with_result/3return the assigned sequence numbers and structured constraint and concurrency violations, pluswait_for_completion/2. (part of #133)ConcurrencyScope.expecting_no_matching_event/1for creation-only guards. (part of #134)Chronicle.Compliance.allow_new_encryption_key_for/2. (part of #135)- Event type options
subject:,tags:,tombstone:,public:andcompensation_for:; the declared subject is resolved on append. (part of #138) (part of #146) childrenblocks in read models and projections for child collections (nested, withfrom,join,removed_with), andclear:to set a scalar back to no value. (part of #127)closes_streamdeclarations on event types, unique constraintmode: :per_value, andChronicle.EventSequences.Streamsto list, close, reopen and check closed stream scopes, read event metadata and verify stored content. (part of #142) (part of #143)Chronicle.ReadModels.query/2options:filterand:sort, evaluated by the client with a:max_scanlimit. (part of #126)Chronicle.ReadModels.observe/2for collections andChronicle.ReadModels.Reactorfor reacting to read model changes. (part of #144)Chronicle.Middlewarefor reactors and reducers, configured globally or per module. (part of #145)Chronicle.Observers.retry_partition/3,clear_partition_quarantine/3andclear_observer_quarantine/2. (part of #141)Chronicle.Client.registration_status/1,await_registration/2and a:registrationoption 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, andwatchdog:reconnects a client stuck short of registered. (part of #132) - A client-side payload guard returning
{:error, {:payload_too_large, size, limit}}, configurable withmax_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
Unauthenticatedresponse 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)
:occurredin projections maps to the event's occurred time instead of the$occurredexpression 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_streamreads the kernel's response correctly. (part of #142)