ruststream_amqp/lib.rs
1//! `AMQP` 1.0 broker implementation for `RustStream`.
2//!
3//! One protocol crate for the whole `AMQP` 1.0 family: `ActiveMQ` Artemis, `RabbitMQ` 4.x (its
4//! `AMQP` 1.0 stack, distinct from the 0.9.1 protocol `ruststream-lapin` speaks), Azure Service
5//! Bus, and every other broker speaking the ISO-standard protocol. Handlers, routers, codecs,
6//! and middleware come from the framework; this crate supplies the transport over
7//! [`fe2o3-amqp`](https://docs.rs/fe2o3-amqp).
8//!
9//! - Acknowledgement maps to protocol dispositions: `ack` accepts, `nack(requeue = true)`
10//! releases, `nack(requeue = false)` rejects (the broker's dead-letter policy applies).
11//! - Request/reply is native: `reply-to`, `correlation-id`, and a dynamic receiver link.
12//! - Headers ride `application-properties` (well-known ones the `properties` section), so no
13//! envelope format is invented and non-Rust peers see plain `AMQP` messages.
14//! - Back-pressure is the protocol's own credit-based flow control, surfaced as the
15//! [`AmqpAddress::credit`] prefetch.
16
17#![forbid(unsafe_code)]
18
19mod address;
20mod broker;
21mod config;
22mod error;
23mod message;
24mod publisher;
25mod subscriber;
26#[cfg(feature = "testing")]
27pub mod testing;
28#[cfg(feature = "transaction")]
29mod txn;
30
31pub use address::{AmqpAddress, DEFAULT_CREDIT, Settle};
32pub use broker::{AmqpBroker, ConnectedAmqpBroker};
33pub use config::Sasl;
34pub use error::AmqpError;
35pub use message::{AmqpMessage, PARTITION_KEY_HEADER};
36pub use publisher::{AmqpPublish, AmqpPublisher};
37pub use subscriber::AmqpSubscriber;
38#[cfg(feature = "transaction")]
39pub use txn::{AmqpTransactionalPublish, AmqpTxnPublisher};