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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
//! The 6-dimension Rust messaging framework.
//!
//! Hexeract is an opinionated messaging framework for Rust. It unifies
//! in-process mediator dispatch, multi-broker bus transport,
//! transactional outbox, sagas, scheduler and request/reply in a
//! single ergonomic crate.
//!
//! This facade re-exports every shipped sub-crate behind opt-in
//! feature flags so consumers only compile what they actually use.
//!
//! # Quick start
//!
//! Outbox over PostgreSQL:
//!
//! ```toml
//! [dependencies]
//! hexeract = { version = "0.4", features = ["outbox-sql-postgres"] }
//! ```
//!
//! Bus over RabbitMQ:
//!
//! ```toml
//! [dependencies]
//! hexeract = { version = "0.4", features = ["bus-rabbitmq"] }
//! ```
//!
//! Both together:
//!
//! ```toml
//! [dependencies]
//! hexeract = { version = "0.4", features = ["outbox-sql-postgres", "bus-rabbitmq"] }
//! ```
//!
//! # Feature matrix
//!
//! | Feature | Enables | Pulls |
//! | --- | --- | --- |
//! | `core` | Cross-cutting primitives (`MessageId`, `CorrelationId`, `HandlerContext`) | [`hexeract_core`] |
//! | `outbox` | Backend-agnostic outbox traits | [`hexeract_outbox`] |
//! | `outbox-postgres` | PostgreSQL outbox backend (deprecated since 0.4.0) | [`hexeract_outbox`] + [`hexeract_outbox_postgres`] |
//! | `outbox-sql-postgres` | PostgreSQL outbox backend via `sqlx` | [`hexeract_outbox`] + [`hexeract_outbox_sql`] |
//! | `outbox-sql-mysql` | MySQL outbox backend via `sqlx` | [`hexeract_outbox`] + [`hexeract_outbox_sql`] |
//! | `outbox-sql-sqlite` | SQLite outbox backend via `sqlx` | [`hexeract_outbox`] + [`hexeract_outbox_sql`] |
//! | `bus` | Backend-agnostic bus traits | [`hexeract_bus`] |
//! | `bus-rabbitmq` | RabbitMQ bus backend | [`hexeract_bus`] + [`hexeract_bus_rabbitmq`] |
//! | `mediator` | In-process CQRS mediator | [`hexeract_mediator`] |
//! | `middleware` | Built-in tracing and timeout middlewares | [`hexeract_middleware`] |
//! | `macros` | `#[handler]` attribute macro for handler registration | [`hexeract_macros`] + [`hexeract_core`] |
//!
//! Every feature transitively enables `core`, so a downstream user
//! who picks `outbox-postgres` automatically has access to
//! `hexeract::core::HandlerContext`.
/// Cross-cutting primitives shared by every feature module.
///
/// Re-export of [`hexeract_core`].
pub use hexeract_core as core;
/// Backend-agnostic outbox traits.
///
/// Re-export of [`hexeract_outbox`].
pub use hexeract_outbox as outbox;
/// PostgreSQL outbox backend (deprecated).
///
/// Re-export of [`hexeract_outbox_postgres`]. Deprecated since 0.4.0: prefer
/// [`outbox_sql`] with the `outbox-sql-postgres` feature.
pub use hexeract_outbox_postgres as outbox_postgres;
/// SQL outbox backends for PostgreSQL, MySQL and SQLite via `sqlx`.
///
/// Re-export of [`hexeract_outbox_sql`]. Enabled by any of the
/// `outbox-sql-postgres`, `outbox-sql-mysql` or `outbox-sql-sqlite` features.
pub use hexeract_outbox_sql as outbox_sql;
/// Backend-agnostic bus traits.
///
/// Re-export of [`hexeract_bus`].
pub use hexeract_bus as bus;
/// RabbitMQ bus backend.
///
/// Re-export of [`hexeract_bus_rabbitmq`].
pub use hexeract_bus_rabbitmq as bus_rabbitmq;
/// In-process CQRS mediator: command, query and notification dispatch.
///
/// Re-export of [`hexeract_mediator`].
pub use hexeract_mediator as mediator;
/// Built-in middlewares: tracing spans and dispatch timeouts.
///
/// Re-export of [`hexeract_middleware`].
pub use hexeract_middleware as middleware;
/// Procedural macros: the `#[handler]` attribute for handler registration.
///
/// Re-export of [`hexeract_macros`].
pub use hexeract_macros as macros;