1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Asynchronous eventing subsystem.
//!
//! This module provides the foundational abstractions and runtime for
//! event publishing, subscription, and processing within an event-driven
//! DDD/CQRS architecture:
//!
//! - [`EventBus`]: A unified publish/subscribe interface decoupled from
//! any specific transport implementation.
//! - [`EventDeliverer`]: Pulls pending events in batches from local
//! persistent storage (such as the transactional Outbox pattern) and
//! forwards them to the bus.
//! - [`EventReclaimer`]: Performs compensation for events that failed,
//! timed out, or were missed during normal delivery, ensuring
//! eventual consistency across aggregate boundaries.
//! - [`EventHandler`]: Defines the contract for consumer-side processing
//! of one, many, or all event types.
//! - [`EventEngine`]: Orchestrates the full pipeline of delivery,
//! subscription, and dispatch — running concurrent handler execution,
//! marking failures, and triggering compensation flows.
//!
//! This module intentionally defines only the protocol and the
//! orchestration engine; it is not bound to any specific transport.
//! It can be wired up to any messaging system (Kafka, NATS, RabbitMQ,
//! etc.) or used with the in-memory implementation provided here for
//! testing and local development.
//!
pub use EventBus;
pub use InMemoryEventBus;
pub use EventDeliverer;
pub use ;
pub use ;
pub use EventReclaimer;