On this page
Overview
Lapin is an AMQP 0-9-1 client for Rust targeting RabbitMQ. It supports Tokio, Smol, and async-global-executor and provides connections, channels, queue declarations, publishing, consuming, acknowledgements, TLS, and automatic recovery.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Use asynchronous connection, channel, publish, consume, and acknowledgement APIs
Applications create AMQP connections and channels, declare queues, publish messages, consume deliveries, and acknowledge them through futures-based APIs.
Sources: [2]
Best fit
Fits RabbitMQ-backed event-driven services and workers
Lapin is suitable for background workers, event distribution, queue-based asynchronous processing, and service-to-service messaging where AMQP 0-9-1 is the required transport.
Sources: [2]
Before adoption
Check Rust 1.88+ and test recovery under broker or network failure
Lapin 4.12.0 requires Rust 1.88. The 4.x line integrates automatic recovery into ConnectionProperties, while 4.12.0 fixes a hang when a server closes during connection.open, so broker restart and network-failure testing remain important.
Official sources
- [1]amqp-rs/lapin — GitHub repository(2026-10-06)
- [2]Lapin 4.12.0 — README(2026-10-06)
- [3]Lapin 4.12.0 — Cargo.toml(2026-10-06)
- [4]Lapin 4.12.0 — CHANGELOG(2026-10-06)
Supplemental curator note
Lapin is focused on async AMQP 0-9-1 access to RabbitMQ. Runtime and TLS backends are selectable, but production deployments should explicitly test recovery, publisher confirms, acknowledgements, and broker/network failure paths.
Try it in 3 steps
- 1
Clone the reviewed Lapin release
Clone Lapin 4.12.0. Rust 1.88 or newer is required.
git clone --depth 1 --branch v4.12.0 https://github.com/amqp-rs/lapin.git && cd lapin - 2
Set the RabbitMQ connection address
Set the same default AMQP address used by the official example. RabbitMQ must be running at this address.
export AMQP_ADDR=amqp://127.0.0.1:5672/%2f - 3
Run the Tokio example connection test
Run the connection test embedded in the official Tokio example to exercise queue declaration, publish, consume, acknowledgement, and connection close.
cargo test --example tokio --features tokio connection -- --nocapture
Growth
Growth trends · Last 30 days
1,237 Stars
Trend data is still being collected.
Built with
Categories and tags
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- amqp
- amqp-client
- amqp0-9-1
- async
- hacktoberfest
- messaging
- rust
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- kafka-go8,638 Stars
2 shared tag(s) · 1 shared category(s)
use high-level Reader and Writer APIs or drop down to a low-level pure-Go Kafka connection
Go - RabbitMQ13,905 Stars
4 shared tag(s)
unify AMQP, MQTT, STOMP, and stream protocols over queues and replicated logs in one messaging broker
JavaScript - Hyper16,351 Stars
2 shared tag(s) · 3 shared category(s) · Same language
build HTTP/1 and HTTP/2 clients and servers with a low-level Rust library
Rust - reqwest11,864 Stars
2 shared tag(s) · 3 shared category(s) · Same language
use async or blocking Rust HTTP clients with JSON, TLS, proxies, and multipart support
Rust - Tower HTTP920 Stars
2 shared tag(s) · 3 shared category(s) · Same language
add tracing, compression, timeouts, and other HTTP behavior as Tower middleware
Rust - Tokio33,338 Stars
2 shared tag(s) · 2 shared category(s) · Same language
run asynchronous Rust I/O, tasks, networking, and timers on one runtime
Rust
Report incorrect information
Tell us if any listing information is incorrect or outdated.