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
//! [`CeremonyEventSubscriberPort`] — the one seam every projection
//! hangs off.
//!
//! A ceremony is its event stream (ADR-012), and everything else — the
//! transcript, the report, what a session leaves behind in memory,
//! what an operator reads off a dashboard — is a projection of it. A
//! projection that learned about a session from the use case that
//! advanced it would be a second place the truth lives, and the two
//! would drift the day a fourth caller appended without telling it. So
//! there is one place to be told, and it is here.
//!
//! # A subscriber cannot fail an append
//!
//! The signature returns nothing. Not a swallowed `Result`, which
//! would let an author believe a failure goes somewhere: a subscriber
//! that has something to report logs it at warning level with the
//! ceremony id and the sequence it was looking at, and returns. The
//! facts landed before this was called, and a projection that cannot
//! be built is rebuilt from the stream it was derived from.
//!
//! # This is not how a durable consumer reads
//!
//! Publication and anything else that must not miss a record keeps its
//! own cursor over the global order and reads the stream through it
//! (plan §3.1, slice A6). A subscriber is told once, in process,
//! immediately; that is the right shape for a projection computed on
//! read and the wrong one for delivery.
use async_trait;
use cratePositionedRecord;
/// Told about the records of one successful append, in order.