eike.schumann/cqrs-eventsourcing-kafka
39.4
Weak · 22 September 2026
2.1k
lines of production code
Java
primary language
6
measurements over time
What this system is
This system is an event-sourcing based platform that manages inventory items through a domain-driven architecture. It utilizes a Kafka-based messaging infrastructure to dispatch commands and publish domain events, while persisting state changes in a JDBC-backed event store with optimistic concurrency control. The system exposes a RESTful API for inventory management, leveraging real-time event streaming and caching for fast data access.
Features
Initial release of the Inventory Item domain service
The inventory item domain service is now available, providing the core capabilities to create, deactivate, rename, check in, and remove items from inventory. The service is configured to run on port 9902, connects to a MariaDB event store, and publishes events to a Kafka broker at kafka:9092.
services-inventoryitem-domain · high confidence
Introduce JDBC-based event store with concurrency control
Adds a new JDBC-backed implementation of the event store, including the JdbcEventStore class, EventMapper, and EventStreams repository. The implementation handles saving and loading events, manages stream versions, and enforces optimistic concurrency by throwing a ConcurrencyException when the expected version does not match the current version. It also publishes each event immediately after persistence, with a note that this will be replaced by CDC in the future. Database schema is provided via a Liquibase migration file that creates the events and streams tables and unique constraints.
services-infrastructure-eventstore-jdbc · high confidence
Introduce JDBC-based event store with database migration support
The event store infrastructure now supports a JDBC-backed persistence layer, allowing applications to store and retrieve domain events in a relational database. This change introduces a new \EventStoreFactory\ that can be configured to use either a local in-memory store or a JDBC-based store. When the JDBC option is selected, the system automatically applies Liquibase database migrations to ensure the schema is up to date. This enables persistent event sourcing for aggregates, where the \EventStoreAwareRepository\ handles saving uncommitted changes and loading aggregates from their event history. An \AggregateNotFoundException\ is thrown if an aggregate is not found in the store.
services-infrastructure-eventstore · high confidence
Introduce Kafka-based messaging infrastructure
The application now uses Apache Kafka for command dispatching and event publishing. A new \KafkaCommandDispatcher\ routes commands to prefixed topics, while a \KafkaCommandListener\ consumes and processes them in a background thread. Additionally, a \KafkaEventPublisher\ serializes events into an \EventEnvelope\ for streaming, and error handling distinguishes between application and system exceptions, publishing corresponding error events.
services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka · high confidence
Introduce core domain primitives for event sourcing
Added new core classes to support an event-sourcing architecture: an \AggregateRoot\ base class that manages uncommitted changes and versioning, along with marker interfaces for \Action\, \Command\, and \Event\. These are paired with corresponding handler interfaces (\ActionHandler\, \CommandHandler\, \EventHandler\) to process commands and apply domain events.
services-core/src/main/java/io/plumery/core · high confidence
Introduce core infrastructure interfaces for command dispatch, event publishing, and persistence
Added new interfaces that define the core infrastructure contracts for the application's domain model. This includes CommandDispatcher for routing commands, EventPublisher for emitting events, EventStore for persisting event streams, and a generic Repository for managing aggregate roots by ID and version. These abstractions establish the foundation for the system's messaging and persistence layers.
services-core/src/main/java/io/plumery/core/infrastructure · high confidence
Introduce inventory item management API with real-time event streaming
The services-inventoryitem-api module is introduced, providing a RESTful API to create, rename, and deactivate inventory items. It integrates with Kafka Streams to denormalize event data into a Hazelcast cache for fast querying, and exposes a Server-Sent Events (SSE) stream for real-time application events. The service also includes Swagger documentation for the API.
services-inventoryitem-api · high confidence
Introduce local command and event publishing infrastructure
Added LocalCommandDispatcher and LocalEventPublisher classes to handle local command dispatching and event publishing respectively. The LocalCommandDispatcher routes commands to registered ActionHandlers, while the LocalEventPublisher publishes events by invoking corresponding handlers with serialized event data.
services-infrastructure-messaging/src/main/java/io/plumery/messaging/local · high confidence
Introduced local event store implementation backed by JDBM
Added new classes EventDescriptor and LocalEventStore to the local event store module. LocalEventStore implements the EventStore interface, providing an in-memory or file-based storage mechanism using JDBM (Java Database Management) for persisting event data. This change enables the system to store and retrieve events for specific aggregates, supporting optimistic concurrency control via version checking.
services-infrastructure-eventstore-local · high confidence
Behavioural changes
Centralized ID serialization logic
The ID serialization logic has been moved to the core module as a new \IDSerializer\ class. This change allows other modules to reuse this serializer for consistent ID handling, rather than each module implementing its own serialization logic.
services-core/src/main/java/io/plumery/core/serializer · low confidence
Introduce Kafka-based messaging infrastructure
The messaging layer now uses Apache Kafka for publishing events and dispatching commands. New factory classes (CommandDispatcherFactory, CommandListenerFactory, EventPublisherFactory) wire up Kafka-specific implementations (KafkaCommandDispatcher, KafkaCommandListener, KafkaEventPublisher) and manage their lifecycle. An ActionHandlerResolver is added to route actions to handlers. This change replaces the previous messaging mechanism with a Kafka-backed one, requiring configuration of Kafka bootstrap servers.
services-infrastructure-messaging/src/main/java/io/plumery/messaging · medium confidence
New exception hierarchy for application and system errors
The core library now provides a structured exception hierarchy to distinguish between application-level errors and system-level failures. A new abstract \ApplicationException\ base class carries an aggregate root ID and a version number, with specific subclasses like \InvalidArgumentException\ and \InvalidStateException\ for different application error types. Additionally, a \SystemException\ class is introduced to wrap system errors with an error event ID, enabling better error tracking and separation of concerns.
services-core/src/main/java/io/plumery/core/exception · high confidence
Dependencies
Initial Maven build structure and dependency management
The project introduces a multi-module Maven build structure, defining a parent POM and several sub-modules (e.g., services-core, services-infrastructure-messaging, services-inventoryitem-domain). This change establishes the foundational build configuration, including dependency management for libraries such as Dropwizard, Kafka clients, Jackson, and Guava, enabling the compilation and packaging of the application's various components.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 43 → 39 (-3.3)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-0.4)
- Architecture 100 → 75 (-24.9)
- Maturity 45 → 45 (+0.0)
- Readiness 15 → 15 (+0.0)
- Security 88 → 87 (-1.3)
- Domain Modelling 77 → 65 (-12.4)
Resolved (13)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (9 lines × 2) (services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaCommandListener.java)
- Low IaC: DS-0005 (services-inventoryitem-api/Dockerfile)
- Low IaC: DS-0005 (services-inventoryitem-domain/Dockerfile)
- Medium IaC: CKV_DOCKER_4 (services-inventoryitem-api/Dockerfile)
- Medium IaC: CKV_DOCKER_4 (services-inventoryitem-api/Dockerfile)
- Medium IaC: CKV_DOCKER_4 (services-inventoryitem-domain/Dockerfile)
- Medium IaC: CKV_DOCKER_4 (services-inventoryitem-domain/Dockerfile)
- Medium IaC: CKV_DOCKER_7 (services-inventoryitem-api/Dockerfile)
- Medium IaC: CKV_DOCKER_7 (services-inventoryitem-domain/Dockerfile)
- No exposed public API
- Scanner failed to run — not a clean result
- single-maintainer — knowledge-concentration (bus factor) risk
New (16)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no usage examples (README.md)
- Duplicated block (15 lines × 2) (services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaCommandListener.java)
- Duplicated block (9 lines × 2) (services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaCommandDispatcher.java)
- Duplicated block (9 lines × 2) (services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaCommandDispatcher.java)
- High IaC: WD-COMPOSE-0002 (docker-compose.yml)
- High IaC: WD-COMPOSE-0002 (docker-compose.yml)
- High IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Low IaC: DS-0005 (services-inventoryitem-api/Dockerfile)
- Low IaC: DS-0005 (services-inventoryitem-api/Dockerfile)
- Low IaC: DS-0005 (services-inventoryitem-domain/Dockerfile)
- Low IaC: DS-0005 (services-inventoryitem-domain/Dockerfile)
- No ADRs found
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
- TodoComment (services-infrastructure-eventstore-jdbc/src/main/java/io/plumery/eventstore/jdbc/JdbcEventStore.java)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
eike.schumann/cqrs-eventsourcing-kafka was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 8007afe639adb8f6a5a676c5a9764e6a0ca0bce6 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.