Expand description
§faucet-source-rabbitmq
A RabbitMQ (AMQP 0.9.1) source for
faucet-stream, built on the pure-Rust lapin
client. Consumes a queue (optionally declaring it and its exchange
bindings), drains until max_messages or idle_timeout_secs fires, and
yields each message body as a record (json / string / bytes).
With ack_mode: on_sink_confirm (the default) a page’s deliveries are
acknowledged only after the pipeline has written and flushed that page, so
a crash redelivers rather than loses messages (at-least-once — pair with a
keyed-upsert sink for effectively-once). ack_mode: auto is at-most-once.
use faucet_source_rabbitmq::{RabbitMqSource, RabbitMqSourceConfig};
let source = RabbitMqSource::new(RabbitMqSourceConfig::new("orders")).await?;Re-exports§
pub use config::AckMode;pub use config::OnDecodeError;pub use config::RabbitMqBinding;pub use config::RabbitMqSourceConfig;pub use stream::RabbitMqSource;
Modules§
- config
- Configuration for the RabbitMQ source.
- stream
RabbitMqSource— the AMQP consumer (the one module that does I/O).
Structs§
- Rabbit
MqConnection Config - Connection settings shared by the RabbitMQ source and sink.
- Rabbit
MqTls - TLS (
amqps://) settings. Server certificates are always verified — there is no insecure mode.
Enums§
- Faucet
Error - All possible errors returned by faucet-stream.
- Rabbit
MqAuth - RabbitMQ authentication.
- Rabbit
MqExchange Kind - An AMQP exchange type, used when a connector declares an exchange.
- Rabbit
MqValue Format - How a message body maps to and from a JSON record.
Constants§
- DESCRIPTOR
- The connector’s static descriptor (RFC 0013): its capabilities, answered from config alone.
Traits§
- Source
- A source fetches records from an external system.