Expand description
Durable change-feed (CDC) — issue #824 (CDC epic #692, Phase 5c).
This mirrors the canonical Python consumer (#823, Phase 5b) with identical
semantics: Kafka-style client-managed committed offsets, a pluggable
CheckpointStore with a file-backed atomic default (FileCheckpointStore),
bootstrap-on-compacted (paged Scan baseline then resume from
snapshot_offset + 1), heartbeat-advances-checkpoint, reconnect-on-disconnect
from last_offset + 1, and at-least-once delivery with idempotency required on
the boundary.
Structs§
- Committed
Change - A single change delivered by
crate::StateletClient::subscribe_committed. - File
Checkpoint Store - Default
CheckpointStorebacked by an atomically-written JSON file. - Subscribe
Committed Options - Configuration for
crate::StateletClient::subscribe_committed. - Tokio
Sleeper - Default tokio-backed
Sleeper.
Enums§
- Consume
Error - Error returned by the consumer driver: either a transport error or an error from the user’s handler / checkpoint store.
- Feed
Item - One item received from the committed feed stream — the SDK-level mirror of
proto::committed_feed_item::Item.
Traits§
- Checkpoint
Store - Pluggable store for a consumer’s last fully-processed CDC offset.
- Feed
Stream - A source of committed-feed items for one server-streaming connection.
- Feed
Transport - Transport abstraction used by the consumer driver: open a feed stream and
page a scan. The real
crate::StateletClientimplements this over gRPC; tests provide a fake. - Sleeper
- Hook used by the driver to wait between reconnect attempts. The default sleeps via tokio; tests override it to avoid real delays.
Functions§
- run_
consumer - Run the durable change-feed consumer driving the canonical Phase-5b
algorithm. This is generic over the
FeedTransportso it is unit-testable without a live server;crate::StateletClient::subscribe_committedis the public entry point wrapping the gRPC transport.