Skip to content

Latest commit

 

History

History
62 lines (50 loc) · 1.58 KB

README.md

File metadata and controls

62 lines (50 loc) · 1.58 KB

Rust code for RabbitMQ tutorials

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

The examples use lapin client library.

You should have a RabbitMQ server running on default port.

Requirements

Code

Each tutorial is a separate crate where each source file corresponds to a binary executable. Each cargo command should be launched in a separate shell.

cd 01-hello-world
cargo run --bin receive
cargo run --bin send
cd 02-work-queues
cargo run --bin worker
cargo run --bin new-task "hi" # specify a custom message
cd 03-publish-subscribe
cargo run --bin subscribe
cargo run --bin publish "hi" # specify a custom message
cd 04-routing
cargo run --bin receive-direct info error # specify log levels
cargo run --bin emit-direct error "help!" # specify severity and custom message
cd 05-topics
cargo run --bin receive-topic kern.* # specify topic filter
cargo run --bin emit-topic kern.mem "No memory left!" # specify topic and message