Skip to main content

faucet_source_sqs/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! # faucet-source-sqs
4//!
5//! AWS SQS source connector for
6//! [faucet-stream](https://github.com/PawanSikawat/faucet-stream): long-polls
7//! `ReceiveMessage`, buffers up to `batch_size` messages, and emits them as
8//! pages with bounded memory. Each page's receipt handles are deleted right
9//! before the page is yielded, and a run terminates on `idle_timeout_secs`
10//! and/or `max_messages`.
11//!
12//! Delivery is **at-least-once**: a crash after a page is emitted but before
13//! the downstream sink durably commits it re-reads any message whose delete did
14//! not land (or whose visibility window elapsed). Pair with an idempotent /
15//! upsert sink when replays must converge. The queue is drained top-to-bottom
16//! with no resumable bookmark — every page carries `bookmark: None`.
17
18mod config;
19mod stream;
20
21pub use config::{MAX_RECEIVE_BATCH, MAX_WAIT_TIME_SECONDS, SqsSourceConfig};
22pub use stream::SqsSource;
23
24// Shared connection types, re-exported so users need only this crate.
25pub use faucet_common_sqs::{SqsCredentials, build_client};