apalis-amqp

Message queuing utilities for Rust using apalis and AMQP.

Overview

apalis-amqp is a Rust crate that provides utilities for integrating apalis with AMQP message queuing systems. It includes an AmqpBackend implementation for use with the pushing and popping jobs, as well as a AmqpStream type for consuming messages from an AMQP queue and passing them to Worker for processing.

Features

Getting started

Add apalis-amqp to your Cargo.toml file:

toml [dependencies] apalis = "0.4" apalis-amqp = "0.1"

Then add to your main.rs

````rust

[tokio::main]

async fn main() -> Result<()> { let env = std::env::var("AMQPADDR")?; let amqpbackend = AmqpBackend::::newfromaddr(&env).await?; let queue = amqpbackend.connect().await?; Monitor::new() .register( WorkerBuilder::new("rango-amigo") .layer(layerfn(|service| { AckService::new(amqpbackend.channel(), service) })) .withstream(|worker| amqpbackend.consume(worker.clone())) .buildfn(test_job), ) .run() .await } ````

License

apalis-amqp is licensed under the Apache license. See the LICENSE file for details.