photon_backend_fluvio/lib.rs
1//! Fluvio [`StoragePort`](photon_backend::StoragePort) for distributed Photon delivery.
2//!
3//! Wraps Fluvio consumer groups, checkpoint persistence, and topic sharding behind the shared
4//! storage contract. Enable via the `fluvio` feature on the
5//! [`photon`](https://docs.rs/uf-photon/latest/photon/) facade.
6//!
7//! Connection and topic options: [`FluvioConfig`] and [`FluvioStoragePortBuilder`]
8//! (builder methods + env fallbacks documented on the builder).
9//!
10//! Wire with [`PhotonBuilder::storage_port`](https://docs.rs/uf-photon/latest/photon/struct.PhotonBuilder.html#method.storage_port)
11//! after [`FluvioStoragePortBuilder::build`](FluvioStoragePortBuilder::build).
12//!
13//! ## Entry points
14//!
15//! - [`FluvioStoragePort`] — Fluvio storage adapter
16//! - [`FluvioConfig`] / [`FluvioStoragePortBuilder`] — connection and topic options
17//! - [`fluvio_endpoint_from_env`] — resolve SC endpoint from environment
18//!
19//! Performance methodology: [`photon-bench/PERFORMANCE_STUDY.md`](../../photon-bench/PERFORMANCE_STUDY.md).
20//!
21//! ## Topic mapping (Fluvio)
22//!
23//! - **Topic:** `photon-{topic}` when `topic_shards = 1`; `photon-s-{shard}-{topic}` when sharded (hyphens only).
24//! - **Checkpoints:** compact topic `photon-checkpoints`.
25//! - **Replay:** [`ReplayCursor::StreamSeq`] uses produce offset+1; [`ReplayCursor::TailOnly`] uses `Offset::end()`.
26
27mod checkpoint;
28mod config;
29mod connect;
30mod consumer;
31mod message;
32mod port;
33mod publish;
34mod replicas;
35mod retention;
36pub mod stream_shard;
37mod subject;
38mod topic;
39
40pub use config::{
41 FluvioConfig, FluvioStoragePortBuilder, ReplayCursor, ENDPOINT_ENV, MAX_INFLIGHT_ENV,
42 PREFIX_ENV, REPLAY_CURSOR_ENV, SYNC_ACK_ENV,
43};
44pub use consumer::{consumer_group_for, durable_consumer_name};
45pub use port::{fluvio_endpoint_from_env, FluvioStoragePort};
46pub use replicas::REPLICAS_ENV;
47pub use retention::RETENTION_ENV;
48pub use stream_shard::TOPIC_SHARDS_ENV;