Skip to main content

Crate kojin_amqp

Crate kojin_amqp 

Source
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.direct exchange → kojin.queue.{name} (routing key = queue name)
  • kojin.dlx exchange → kojin.dlq.{name} (dead-letter)
  • kojin.delayed exchange for scheduled tasks (requires the rabbitmq-delayed-message-exchange plugin)

§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§

config
topology

Structs§

AmqpBroker
RabbitMQ broker using AMQP 0.9.1 via lapin.