Expand description
Transactional outbox primitives for the Hexeract messaging framework.
The outbox pattern stores outgoing domain events in the same database
transaction as the business state mutation, then a worker polls the
table and dispatches each row to its registered handler. This crate
ships the backend-agnostic primitives: the Event marker trait, the
persisted OutboxEnvelope row representation, and the unified
OutboxError type.
Backend implementations live in companion crates such as
hexeract-outbox-sql.
Re-exports§
pub use envelope::OutboxEnvelope;pub use error::OutboxError;pub use event::Event;pub use handler::Handler;pub use publisher::OutboxPublisher;pub use worker::BoxFuture;pub use worker::ErasedHandler;pub use worker::OutboxStore;pub use worker::OutboxWorker;pub use worker::OutboxWorkerConfig;pub use worker::TypedHandler;
Modules§
- envelope
- Persisted representation of an event awaiting dispatch.
- error
- Errors raised by the outbox primitives, publishers and workers.
- event
- Marker trait for domain events that flow through the outbox.
- handler
- Asynchronous handler contract dispatched by the worker.
- publisher
- Backend-agnostic contract for inserting events into the outbox.
- worker
- Poll loop worker, type-erased dispatch and store abstraction.