rabbitmq-tutorials/rust-lapin
dependabot[bot] 0ab98d246e
chore(deps): bump ring from 0.17.8 to 0.17.13 in /rust-lapin
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 19:01:40 +00:00
..
src/bin Begin porting Rust tutorials to amqprs (in addition to Lapin) 2023-04-13 00:28:52 +04:00
.gitignore Begin porting Rust tutorials to amqprs (in addition to Lapin) 2023-04-13 00:28:52 +04:00
Cargo.lock chore(deps): bump ring from 0.17.8 to 0.17.13 in /rust-lapin 2025-03-07 19:01:40 +00:00
Cargo.toml Begin porting Rust tutorials to amqprs (in addition to Lapin) 2023-04-13 00:28:52 +04:00
README.md Begin porting Rust tutorials to amqprs (in addition to Lapin) 2023-04-13 00:28:52 +04:00

Rust code for RabbitMQ tutorials (using Lapin)

Here you can find the Rust code examples for RabbitMQ tutorials.

The examples use lapin client library.

These tutorials assume a RabbitMQ server node running locally using default ports.

Requirements

Code

Each cargo command should be launched in a separate shell.

Tutorial one: "Hello World!"

cargo run --bin receive
cargo run --bin send

Tutorial two: Work Queues

cargo run --bin worker
cargo run --bin new_task "hi" # specify a custom message

Tutorial three: Publish/Subscribe

cargo run --bin receive_logs
cargo run --bin emit_log "hi" # specify a custom message

Tutorial four: Routing

cargo run --bin receive_logs_direct info error # specify log levels
cargo run --bin emit_log_direct error "help!" # specify severity and custom message

Tutorial five: Topics

cargo run --bin receive_logs_topic kern.* # specify topic filter
cargo run --bin emit_log_topic kern.mem "No memory left!" # specify topic and message

Tutorial six: RPC

cargo run --bin rpc_server
cargo run --bin rpc_client