nestrs_outbox/lib.rs
1//! NestJS [`@nestjs/outbox`](https://docs.nestjs.com/techniques/outbox) analogue —
2//! transactional outbox, relay, retries, and dead-letter queue.
3//!
4//! # Flow
5//!
6//! 1. [`OutboxRelay::add`] inside the same logical transaction as business writes.
7//! 2. Background loop calls [`OutboxRelay::tick`] with a [`PublishFn`].
8//! 3. Success → published; failure → retry; after `max_attempts` → DLQ.
9//!
10//! # Module
11//!
12//! ```ignore
13//! use nestrs_outbox::{OutboxModule, OutboxOptions};
14//! let dm = OutboxModule::register(OutboxOptions::default());
15//! ```
16//!
17//! Set `allow_in_memory: false` once a durable store adapter is configured.
18//! Pair with `nestrs-webhooks` for signed outbound delivery.
19//!
20//! Umbrella feature: `nestrs` / `outbox` → `nestrs::outbox`.
21
22#![doc(html_root_url = "https://docs.rs/nestrs-outbox/1.7.1")]
23
24mod module;
25mod options;
26mod relay;
27mod store;
28
29pub use module::OutboxModule;
30pub use options::OutboxOptions;
31pub use relay::{OutboxRelay, PublishFn};
32pub use store::{
33 DeadLetter, InMemoryOutboxStore, OutboxMessage, OutboxStatus, OutboxStore, SharedOutboxStore,
34};
35
36pub use nestrs_core::{DynamicModule, Injectable, ProviderRegistry};