Skip to main content

faucet_source_pubsub/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! # faucet-source-pubsub
4//!
5//! Google Cloud Pub/Sub source connector for
6//! [faucet-stream](https://github.com/PawanSikawat/faucet-stream): streaming
7//! pull from a subscription, per-message record assembly with a configurable
8//! `value_format` (json / string / bytes) and an attribute map surfaced under
9//! a configurable key, and the standard `idle_termination_secs` /
10//! `max_messages` termination knobs (at least one is required).
11//!
12//! **Delivery is at-least-once.** Messages are acked only at **durable page
13//! boundaries** — a page's messages are acked once the pipeline has written
14//! that page to the sink and persisted its bookmark, so a crash between the
15//! sink write and the ack redelivers those messages on the next run. Pair with
16//! an upsert sink keyed on `message_id` when replays must converge. Exactly-once
17//! delivery is out of scope (Pub/Sub provides no compatible primitive).
18
19mod config;
20mod convert;
21mod state;
22mod stream;
23
24pub use config::{DEFAULT_ATTRIBUTES_KEY, PubsubSourceConfig, ValueFormat};
25pub use state::PubsubBookmark;
26pub use stream::PubsubSource;
27
28// Shared connection types, re-exported so users need only this crate.
29pub use faucet_common_pubsub::{PubsubConnection, PubsubCredentials};