Repository navigation
Release v4.129.0
Summary
Read models can declare composite keys, and lookups must supply every key part by name. Commands can send a single production to a different event source or stream, and reactions and reducers can watch only the events that land in a given event source or stream. The route overrides and observer filters are executable as part of ESM v10.
Added
- Read-model properties take a trailing
keymodifier. Several properties markedkeyform a composite key. Queries name every key part in abyblock, and command and triggerreadsmap each part by name (part = source) underby. A lookup that misses a part, names an unknown part or supplies an incompatible, optional, collection or literal value is reported (PLAY0660, PLAY0661, PLAY0662) (#459) - A partial command
reads … bycan be completed by a typed repair when each missing part has exactly one same-named, compatible command property. Queries and trigger reads are not repaired (#459) - A plain or inline
producescan carry its ownstream Source.Streamline withstreamIdmappings. It replaces the command route for that production only, and other productions keep the command route. A route line under a reaction or refusal production is an error (PLAY0663), and an override equal to the command route is a warning with a removal repair (PLAY0664) (part of #302) - Reactions and reducers take
from Sourceorfrom Source.Streamand then see only facts routed there. Unrouted facts never match. An invalid filter is an error (PLAY0665), and a filter that excludes every known producer of a trigger event is a warning (PLAY0666) (part of #302) - ESM v10 admits production route overrides and observer filters next to the reaction system identity. A model selects v10 when it uses any of the three. Every other model keeps its version and bytes, and strict readers for schema 9 and earlier reject the new members (part of #302)
- Monaco and the VS Code extension highlight, complete and explain keys,
byblocks, production routes and filters. The event model board shows key fields, composite lookups, per-production routes and what each reaction or reducer observes - The Invoicing sample routes payments through a
Paymentevent source with a production override, filtered reactions and reducers, and a composite-keyed view. The TimeTracking sample reads an engagement month row by its composite key
Changed
- A single explicit
keydecides a read model's identifier instead of inference from its queries, and binds to the same executable bytes as the inferred identifier. Composite keys and querybyblocks are checked when compiling, and executable binding refuses them with PLAY0268 until #599 admits them (#459) - The identifier-type check for a command route skips productions that carry their own route, and specification route expectations use each production's effective route (part of #302)