Release v2.9.0
Summary
Artifacts register themselves, and the twelve open issues in this repository are
closed alongside — most of them parity gaps with the .NET client, several of
them things a JVM application simply could not express before.
Added
- Artifacts are discovered and registered with the kernel automatically when the client connects, in the order the kernel needs them, and again on every reconnect. Manual registration is unchanged and still fully supported.
IEventStore.registerAll()registers every artifact in one call, andawaitRegistration()waits for the automatic pass so the first append is deterministic.ChronicleOptions.withoutAutoRegistration()turns discovery off, andwithArtifactsFrom(vararg packages)narrows it to the packages you own.KnownClientArtifactstakes an explicit list where classpath scanning is unwanted.IArtifactActivatorlets a dependency injection container create artifacts, so a reactor or reducer can take its dependencies through its constructor.- Reactor, reducer and read model reactor handlers may be
suspend, so a handler that awaits an HTTP call or the event log no longer blocks the thread the observation runs on. (#16) IReactorMiddlewarewraps every reactor handler invocation, keeping tracing, logging and metrics out of reactor code. Java implementsBlockingReactorMiddlewareinstead. (#11)- A reactor handler may take parameters beyond the event — a read model resolved for the event's event source out of the box, or anything an
IReactorMethodArgumentResolversupplies. (#27) ICanBeNotifiedAboutReplaytells a reactor when a replay begins and ends, per partition. (#13)store.failedPartitionssurfaces the partitions an observer is stuck on, with the history of attempts, and retries one once the cause is fixed. (#13)ConceptAs<T>gives a domain value a type of its own, so the compiler can tell a book's identifier from a member's. Concepts serialize as the value they wrap, so adopting one for a property already in production changes neither the JSON nor the schema. (#15)AppendOptions.causationandEventForEventSourceId.causationattribute an append to a chain other than the ambient one — an imported event, or a side effect that belongs to a chain of its own. (#43)- Chronicle work is reported as OpenTelemetry spans: appends, batches, reactor observations and reducer folds. Nothing to turn on. (#18)
IProjectionsService.query(declaration)runs a Projection Declaration Language declaration and returns what it projected, without registering anything. (#19)- Captures — sources outside Chronicle, pulled in and appended as events. Declare an
ICaptureand discovery saves and starts it on connect, or drivestore.capturesdirectly. (#10) io.cratis:chronicle-testing—EventScenarioandReadModelScenariospecify what a slice appends and what a reducer folds, in-process, with no kernel, container or database. (#25)- Guides for artifact registration, strongly-typed identifiers, tracing, captures and testing.
Changed
ChronicleOptionsgainsautoDiscoverAndRegister(on by default),artifacts,artifactActivatorandopenTelemetry.- Both console samples now opt out of automatic registration, so they keep working as a tour of the registration API.
IConstraintBuilder.uniqueForandIWebhookDefinitionBuilder.withEventTypetake a JavaClassas well as aKClass, andCausation.of(...)builds one without naming a value class — all three were unreachable from Java before. (#36)
Fixed
- A reactor, reducer or read model reactor with no handlers at all now fails at registration instead of registering successfully and observing nothing. (#17)
- A reactor or reducer declared
internalor private failed on every event it was given, because reflection refused to invoke a handler on a non-public class. - The client's public ABI is checked in and validated on every build, and a Java conformance fixture compiles every public entry point from Java — Java had broken twice while CI stayed green. (#36)