Expand description
RabbitMQ (AMQP) broker for the kojin task queue.
This crate provides AmqpBroker, a Broker
implementation backed by RabbitMQ using the AMQP 0.9.1 protocol.
§Topology
kojin.directexchange →kojin.queue.{name}(routing key = queue name)kojin.dlxexchange →kojin.dlq.{name}(dead-letter)kojin.delayedexchange for scheduled tasks (requires therabbitmq-delayed-message-exchangeplugin)
§Example
use kojin_amqp::{AmqpBroker, AmqpConfig};
let config = AmqpConfig::new("amqp://guest:guest@localhost:5672/%2f");
let queues = vec!["default".into(), "emails".into()];
let broker = AmqpBroker::new(config, &queues).await?;Re-exports§
pub use config::AmqpConfig;
Modules§
Structs§
- Amqp
Broker - RabbitMQ broker using AMQP 0.9.1 via
lapin.