Skip to main content

jEAP Reaction Observer Library

jEAP Reaction Observer is a library that detects, tracks, and documents how a microservice reacts to incoming events and commands. It hooks into jEAP Messaging and records, per consumed message (the trigger), which events and commands the service produces in response (the actions). This runtime behaviour is published as Kafka events that feed the jEAP Reaction Observer Service and, through it, the jEAP ArchRepo system-behaviour documentation. It provides:

  • Automatic observation of reactions (produced events/commands) per consumed message, with no business-code changes
  • A Reaction Identified Event emitted when a new behavioural pattern is first observed after startup
  • A Reactions Observed Event emitted on a schedule with aggregated reaction counts over a timeframe
  • Spring Boot auto-configuration via a single starter; enabled by default, toggled with one property
  • Best-effort, low-overhead recording that never interferes with business logic

Documentation

Start with Getting started, then follow the links below.

TopicFile
Getting started (add the starter, configure topics)docs/getting-started.md
How it works (triggers, actions, reactions, observed events)docs/how-it-works.md
Configuration reference (jeap.reaction.observer.*)docs/configuration.md
System behaviour documentation (the bigger picture)docs/system-behaviour-documentation.md

Modules

The artifact consuming services depend on is jeap-reaction-observer-starter. Group id for all modules is ch.admin.bit.jeap; the version is managed by the jEAP Spring Boot parent.

ModulePurpose
jeap-reaction-observer-coreDomain model and recording logic: Observation, Reaction, ReactionRecorder, ReactionObserverService
jeap-reaction-observer-messagingjEAP Messaging callback (ObserverKafkaMessageCallback) that feeds the recorder from Kafka send/consume hooks
jeap-reaction-observer-eventsBuilds and publishes the ReactionIdentifiedEvent / ReactionsObservedEvent Kafka events, plus the scheduler
jeap-reaction-observer-starterSpring Boot auto-configuration; the main consumer-facing artifact
jeap-reaction-observer-testTest fixtures (ReactionKafkaTestBase, test event builders, consumers)