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
//! Consumer-offset snapshot returned by
//! [`crate::trigger::broker::TriggerBroker::list_consumers`].
//!
//! The shape mirrors the subset of `async_nats::jetstream::consumer::Info`
//! that backup/restore needs to capture and re-apply on a fresh broker
//! instance: a stable identifier per consumer, the topic it is bound to,
//! and the two stream-sequence positions JetStream tracks (the last
//! sequence delivered to the consumer, and the ack floor below which
//! every message has been explicitly acknowledged). Fields are `u64`
//! because JetStream's sequence numbers are `u64`; truncating to `i64`
//! would be a silent precision loss at the API boundary.
//!
//! The in-memory broker does not implement explicit acks — its
//! `last_ack_stream_sequence` equals `last_delivered_stream_sequence` so
//! a backup-restore cycle through the mock round-trips the same value.
use crateTopicId;
/// One consumer's offset state at the moment [`list_consumers`] was
/// called. JetStream calls this its `consumer::Info`; we keep only the
/// fields that the engine's backup/restore path consumes so the OSS
/// surface does not leak driver-specific bookkeeping (cluster info,
/// pause state, push-bound flags, …).
///
/// [`list_consumers`]: crate::trigger::broker::TriggerBroker::list_consumers