Skip to main content

ruststream_sqs_sns/
lib.rs

1//! Amazon SQS broker implementation for `RustStream`, with SNS fan-out publishing.
2//!
3//! Handlers, routers, codecs, and middleware come from the framework; this crate supplies the
4//! transport over the official [`aws-sdk-sqs`](https://docs.rs/aws-sdk-sqs) and
5//! [`aws-sdk-sns`](https://docs.rs/aws-sdk-sns) clients.
6//!
7//! - Deleting a message is the acknowledgement, zeroing its visibility is the requeue, and a
8//!   retry with a delay sets the visibility timeout to that delay - the framework's deferred
9//!   retry is native, not emulated.
10//! - A handler outliving the visibility timeout is protected by crate-owned background
11//!   extension for as long as it holds the message.
12//! - The queue's redrive policy provides dead-lettering; FIFO message group ids map onto the
13//!   partition key.
14//! - SNS appears only as a publisher (fan-out to queues and other endpoints), as a distinct
15//!   [`SnsPublish`] policy.
16
17#![forbid(unsafe_code)]
18
19mod broker;
20mod error;
21mod message;
22mod publisher;
23mod queue;
24mod subscriber;
25#[cfg(feature = "testing")]
26pub mod testing;
27
28pub use broker::{ConnectedSqsBroker, SqsBroker};
29pub use error::SqsError;
30pub use message::{PARTITION_KEY_HEADER, RECEIVE_COUNT_HEADER, SqsMessage};
31pub use publisher::{SnsPublish, SnsPublisher, SqsPublish, SqsPublisher};
32pub use queue::SqsQueue;
33pub use subscriber::SqsSubscriber;