ruststream-sqs-sns¶
ruststream-sqs-sns is the Amazon SQS broker for the
RustStream messaging framework, with SNS fan-out
publishing. A subscriber long-polls its queue and can take native batches over ReceiveMessage.
Retries run through the message's visibility timeout, and dead-lettering through the queue's
redrive policy. You set a message group per publish to a FIFO queue, or fix one for a whole
publish position, and read it back from the message you receive.
The transport is built on the official aws-sdk-sqs client. The
sns feature adds publishing to SNS topics over aws-sdk-sns; it
is off by default, so a service that only works with queues does not link the SNS client. The
testing feature gives the broker an in-process mode, so a test runs the production app with no
server, and the asyncapi feature adds the sqs bindings to the document the framework
generates.
The crate tracks the released ruststream 0.7 line:
ruststream = { version = "0.7", features = ["macros", "json"] }
ruststream-sqs-sns = "0.7"
serde = { version = "1", features = ["derive"] }
#[app]
fn service() -> impl App {
RustStream::new(AppInfo::new("orders", "0.1.0")).with_broker(
SqsBroker::new()
.endpoint("http://localhost:4566")
.test_credentials()
.region("us-east-1"),
|b| {
b.include(handle);
},
)
}
Where to go next¶
The crate's own documentation is its rustdoc on docs.rs, and it opens with the guide this site used to carry: what the queue answers natively, how a delivery is settled, where a spent one goes, and what a publish may carry.
- Subscribing - the queue descriptor, settlement, the attempt cap, batches, and what a delivery carries.
- Publishing - the two publish policies, replies, SNS fan-out, and FIFO message groups.
- RustStream docs - the framework itself: subscribers, routing, codecs, middleware, the CLI.
- API reference - the crate's rustdoc on docs.rs.
How this site relates to the RustStream docs¶
This site is the entry page. What SQS and SNS do is in the crate's rustdoc, including testing the production app in process and the operational surface. Framework concepts that apply to every broker live in the RustStream documentation.