A tiny, fast, annotation-driven event bus for Java.
- Simple API:
@Subscribe,EventBus.post(...) - Cancellable events: opt-in via
Cancellable - Priorities & once-only handlers
- Subtype-aware dispatch (handlers for supertypes receive subtypes)
- Sync by default, optional async with an
Executor - Zero external dependencies
Package:
com.dractical.conduit
For a quick demo, check src/test/java/test/Demo.java
@Subscribe(priority, ignoreCancelled, receiveSubtypes, once)- Deterministic ordering: priority, then registration order
DeadEventpublished when an event has no listeners (if someone listens forDeadEvent)- Optional
postAsync(event)when constructed with anExecutor - Error hook via
EventBus.ErrorHandler
Conduit is a small library. Drop the source under src/main/java/com/dractical/conduit/ or publish it to your internal
repo.
Contributions welcome! Open issues/PRs with tests.