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
//! Publishing abstraction between the outbox worker and the external broker.
//!
//! [`Transport`] is the narrow boundary an implementation crate (such as
//! `outbox-kafka` or `outbox-rabbit`) has to satisfy for
//! [`OutboxManager`](crate::manager::OutboxManager) to deliver events to a
//! message bus.
use crateOutboxError;
use crateEvent;
use Debug;
/// Publishes a single [`Event`] to an external system.
///
/// Implementations are expected to be self-contained — everything the
/// transport needs (connection pool, topic mapping, serializer) should live
/// inside the `impl` so that the worker can keep its loop simple and focused
/// on orchestration.
///
/// Implementations must be `Send + Sync` because the manager holds them
/// behind an `Arc` and may drive them from arbitrary tokio tasks.