Skip to content

Release v2.9.0

Choose a tag to compare

@github-actions github-actions released this 07 Aug 11:12
dc6861e

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, and awaitRegistration() waits for the automatic pass so the first append is deterministic.
  • ChronicleOptions.withoutAutoRegistration() turns discovery off, and withArtifactsFrom(vararg packages) narrows it to the packages you own. KnownClientArtifacts takes an explicit list where classpath scanning is unwanted.
  • IArtifactActivator lets 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)
  • IReactorMiddleware wraps every reactor handler invocation, keeping tracing, logging and metrics out of reactor code. Java implements BlockingReactorMiddleware instead. (#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 IReactorMethodArgumentResolver supplies. (#27)
  • ICanBeNotifiedAboutReplay tells a reactor when a replay begins and ends, per partition. (#13)
  • store.failedPartitions surfaces 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.causation and EventForEventSourceId.causation attribute 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 ICapture and discovery saves and starts it on connect, or drive store.captures directly. (#10)
  • io.cratis:chronicle-testingEventScenario and ReadModelScenario specify 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

  • ChronicleOptions gains autoDiscoverAndRegister (on by default), artifacts, artifactActivator and openTelemetry.
  • Both console samples now opt out of automatic registration, so they keep working as a tour of the registration API.
  • IConstraintBuilder.uniqueFor and IWebhookDefinitionBuilder.withEventType take a Java Class as well as a KClass, and Causation.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 internal or 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)