1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! # faucet-source-rabbitmq
//!
//! A [RabbitMQ](https://www.rabbitmq.com) (AMQP 0.9.1) source for
//! `faucet-stream`, built on the pure-Rust [`lapin`](https://crates.io/crates/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.
//!
//! ```no_run
//! use faucet_source_rabbitmq::{RabbitMqSource, RabbitMqSourceConfig};
//! # async fn ex() -> Result<(), faucet_core::FaucetError> {
//! let source = RabbitMqSource::new(RabbitMqSourceConfig::new("orders")).await?;
//! # let _ = source;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use RabbitMqSource;
pub use ;
pub use ;
/// The connector's static descriptor (RFC 0013): its capabilities, answered from config alone.
pub const DESCRIPTOR: ConnectorDescriptor =
new;