noear/damibus
56.9
Adequate · 21 September 2026
3.8k
lines of production code
Java
primary language
4
measurements over time
What this system is
Dami2 is a local procedure call (RPC) and event bus framework that facilitates asynchronous messaging and service invocation. It provides a core messaging system with configurable routing, interceptors, and payload handling, alongside an RPC mechanism for registering and consuming services. The library offers seamless integration with Spring Boot and Solon frameworks through auto-configuration and plugins, enabling developers to build event-driven applications with minimal boilerplate.
Features
Add Solon plugin for Dami2 topic and event handling
The dami2-solon-plugin module now provides a Solon integration that enables topic-based messaging and event listening within the Solon framework. It introduces the \DamiTopic\ annotation to declare message handlers and event listeners, with \DamiTopicBeanBuilder\ managing bean registration and lifecycle. Listeners are automatically unregistered when the application context stops, ensuring clean shutdown. The plugin also registers \EventInterceptor\ wrappers and configures \Coder\ instances for serialization.
dami2-solon-plugin/src · high confidence
Add Spring Boot auto-configuration for Dami2 messaging
Introduces Spring Boot auto-configuration for the Dami2 messaging framework, enabling automatic scanning and registration of message handlers. This includes the \DamiBeanDefinitionScanner\ to detect classes annotated with \@DamiTopic\, a \DamiBeanPostProcessor\ to register and unregister providers and listeners, and a \DamiImportBeanDefinitionRegistrar\ to handle the \@DamiScan\ annotation for package scanning. The integration is wired via \spring.factories\ and \AutoConfiguration.imports\ to automatically configure the Dami2 context within a Spring Boot application.
dami2-springboot-starter/src · high confidence
Added CollUtil utility class for collection operations
A new CollUtil class has been added to the dami2 utility package, providing helper methods for creating Maps and Lists from variable arguments. This introduces new convenience methods for converting key-value pairs into a Map and converting arrays into mutable Lists, streamlining common collection initialization tasks.
dami2/src/main/java/org/noear/dami2/util · high confidence
Introduces Dami2 framework with bus and LPC interfaces
The Dami2 package introduces a new local procedure call (LPC) and event bus framework. The Dami class provides static access to a global DamiBus and DamiLpc instance, as well as factory methods (newBus, newLpc) to create isolated instances for testing. The DamiConfig class allows users to configure the global bus and LPC by setting an EventRouter, EventDispatcher, EventFactory, Coder, or by replacing the bus/Lpc instances entirely.
dami2/src/main/java/org/noear/dami2 · high confidence
Introduces Dami2-specific annotations and exception classes
The Dami2 library now includes new Java source files defining the \@Param\ annotation for parameter handling and two custom exception classes, \DamiException\ and \DamiNoListenException\, which extend \RuntimeException\ and \DamiException\ respectively. These additions provide the foundational annotation and error-handling infrastructure for the Dami2 framework.
dami2/src/main/java/org/noear/dami2/annotation, dami2/src/main/java/org/noear/dami2/exception · high confidence
New LPC implementation classes for consumer/provider invocation and topic listening
The dami2 module introduces four new classes in the \dami2/lpc/impl\ package to handle local procedure call (LPC) operations. \ConsumerInvocationHandler\ acts as a proxy for consumers, routing method calls to message bus topics and ensuring that exceptions are consistently wrapped in \DamiException\. \ProviderMethodEventListener\ handles incoming events by decoding payloads and invoking the corresponding service methods. \MethodHandlerUtils\ provides cross-version Java support for invoking default interface methods, utilizing reflection for older Java versions and the \invokeDefault\ API for Java 16+. \TopicListenRecord\ serves as a simple container for associating topics with their respective listeners. These changes implement the core mechanics for service invocation and event handling within the LPC subsystem.
dami2/src/main/java/org/noear/dami2/lpc/impl · high confidence
New call and stream bus extensions with dedicated listeners and payloads
The \dami2\ bus package introduces new \CallBusExtension\ and \StreamBusExtension\ interfaces, each providing methods to send events and register listeners (\listen\) for call and stream topics respectively. These extensions utilize new payload classes (\CallPayload\, \StreamPayload\) and event listener interfaces (\CallEventListener\, \StreamEventListener\) to handle data and asynchronous sinks. The \ReceivablePayload\ base class and its \onError\ method ensure that exceptions are properly propagated to the respective sinks (e.g., \CompletableFuture\ or \Subscriber\), providing a structured way to manage call and stream-based bus interactions.
dami2/src/main/java/org/noear/dami2/bus/receivable · high confidence
Behavioural changes
Introduces new Coder interface and encoders for method parameter handling
The local procedure call (LPC) module now includes a new \Coder\ interface with two implementations: \CoderForName\, which aligns method parameters by name (using \@Param\ annotations), and \CoderForIndex\, which aligns them by position. The legacy \CoderDefault\ class is marked as deprecated in favor of \CoderForName\. Additionally, the \DamiLpc\ interface and its implementation have been updated to support provider registration via \registerProvider\ (replacing the previous \registerService\ naming convention) and consumer creation via \createConsumer\, allowing for flexible parameter encoding strategies in RPC calls.
dami2/src/main/java/org/noear/dami2/lpc · high confidence
Redesigned event bus with interceptor chain and configurable routing
The event bus has been restructured to support an interceptor chain pattern, allowing developers to wrap or modify events before they are dispatched. The default implementation now uses a configurable \EventRouter\ (defaulting to \HashTopicEventRouter\) to match topics to listeners, and an \EventDispatcher\ that executes registered \EventInterceptor\s in a defined order. Additionally, the \Result\ interface now includes a \thenConsume\ method for chaining operations on the result, and the \Event\ interface exposes \getPayloadAs\ for type-safe payload access.
dami2/src/main/java/org/noear/dami2/bus · high confidence
Refactored event routing with dedicated implementations for path, hash, and tag-based matching
The event bus routing logic has been restructured to separate concerns into specialized router implementations. A new \EventRouter\ interface defines the contract, while \HashTopicEventRouter\ handles exact topic matching using a hash map. \PathTopicEventRouter\ supports pattern-based matching (using \\\ and \\\*\ wildcards) for hierarchical topics. \TagTopicEventRouter\ enables filtering by topic and associated tags. Additionally, the \add\ and \remove\ methods on the router now use \topicExpr\ as the parameter name to better reflect that the input is an expression (supporting patterns or tags) rather than a literal topic string.
dami2/src/main/java/org/noear/dami2/bus/route · high confidence
Test coverage
Added Solon-based integration tests for event-driven communication; Added benchmark tests for Dami2 routing and messaging; Added demo and listener examples for event handling; Added demo test for Solon integration; Added demo00 test cases for Dami2 bus and LPC; Added demo31\_lpc test suite for LPC service registration; Added integration tests for Solon and Spring Boot frameworks; Added test and demo code for Dami2 bus and reactive streams; Added test for Solon proxy demo 87; Added test suites for Dami2 event-driven communication patterns; Added tests for Dami2 event bus and Solon integration; Added tests for patterned event routing; Added tests for the demo92 Spring Boot integration; Added unit tests for Dami2 bus call and listen functionality; Added unit tests for Dami2 event bus and Solon/Spring Boot integration; Added unit tests for RPC and listen exception handling; Added unit tests for route matching logic; Added unit tests for stream and attachment features; Added unit tests for the Dami2 event bus monitoring and interception features; Added unit tests for the Solon-based Dami2 demo; Added unit tests for the message bus send/receive functionality.
Dependencies
Introduce dami2 Maven build structure
The dami2 project is restructured into a multi-module Maven build, introducing a parent POM (dami2-parent) that defines shared properties and dependency management for the core library (dami2), the Solon plugin (dami2-solon-plugin), and the Spring Boot starter (dami2-springboot-starter). This setup establishes version 2.0.5 for the dami2 artifacts and manages dependencies such as slf4j (2.0.9), reactive-streams (1.0.4), Solon (3.9.6), and Spring Boot (2.0.4.RELEASE) across the modules.
(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 53 → 57 (+4.1)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 98 → 99 (+0.9)
- Architecture 95 → 100 (+5.3)
- Maturity 58 → 61 (+3.3)
- Readiness 26 → 31 (+5.2)
- Security 100 → 100 (+0.0)
Resolved (12)
- Change coupling: CallBusExtension.java ↔ StreamBusExtension.java (dami2/src/main/java/org/noear/dami2/bus/receivable/CallBusExtension.java)
- Change coupling: CallBusExtension.java ↔ StreamEventListener.java (dami2/src/main/java/org/noear/dami2/bus/receivable/CallBusExtension.java)
- Change coupling: CallEventListener.java ↔ StreamBusExtension.java (dami2/src/main/java/org/noear/dami2/bus/receivable/CallEventListener.java)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (11 lines × 2) (dami2-springboot-starter/src/main/java/org/noear/dami2/spring/boot/DamiBeanPostProcessor.java)
- Duplicated block (7 lines × 6) (dami2/src/main/java/org/noear/dami2/bus/route/HashTopicEventRouter.java)
- LLM evaluation failed
- No exposed public API
- Off-boarding risk: anonymized user #1
- Scanner failed to run — not a clean result
- Test reliability not included
New (46)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Duplicated block (8 lines × 6) (dami2/src/main/java/org/noear/dami2/bus/route/HashTopicEventRouter.java)
- Duplicated block (9 lines × 2) (dami2-springboot-starter/src/main/java/org/noear/dami2/spring/boot/DamiBeanDefinitionScanner.java)
- Duplicated block (9 lines × 2) (dami2-springboot-starter/src/main/java/org/noear/dami2/spring/boot/DamiBeanPostProcessor.java)
- Members sharing a duplicated core (6 members, 50+ identical tokens) (dami2/src/main/java/org/noear/dami2/bus/route/HashTopicEventRouter.java)
- No assertions: fallback (dami2/src/test/java/features/demo12_call/Demo12.java)
- No assertions: main (dami2/src/test/java/features/demo11_send/Demo11.java)
- No assertions: main (dami2/src/test/java/features/demo11_send/Demo11_async.java)
- No assertions: main (dami2/src/test/java/features/demo11_send/Demo11_rx.java)
- No assertions: main (dami2/src/test/java/features/demo12_call/Demo12.java)
- No assertions: main (dami2/src/test/java/features/demo12_call/Demo12_async.java)
- No assertions: main (dami2/src/test/java/features/demo13_stream/Demo13.java)
- No assertions: main (dami2/src/test/java/features/demo14_attachmemt/Demo14.java)
- No assertions: main (dami2/src/test/java/features/demo15_intercept/Demo15.java)
- No assertions: main (dami2/src/test/java/features/demo17_monitor/Demo17_dispatcher.java)
- No assertions: main (dami2/src/test/java/features/demo17_monitor/Demo17_intercept.java)
- No assertions: main (dami2/src/test/java/features/demo21_send/Demo21.java)
- No assertions: main (dami2/src/test/java/features/demo22_call/Demo22.java)
- No assertions: main (dami2/src/test/java/features/demo22_call/Demo22_async.java)
- …and 26 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
noear/damibus 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 21 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 8fb13327634dc9abd97c8e236b6c4a1c5dd94874 — 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-fa71c66cabd8.