rabbitmq-tutorials/rust
2019-06-04 21:03:17 +03:00
..
01-hello-world Rust: Tutorial 1 - Hello, World 2019-06-04 17:56:46 +03:00
02-work-queues Rust: Tutorial 2 - Work Queues 2019-06-04 18:24:46 +03:00
03-publish-subscribe Rust: Renaming and readme cleanup 2019-06-04 21:03:17 +03:00
04-routing Rust: Renaming and readme cleanup 2019-06-04 21:03:17 +03:00
05-topics Rust: Tutorial 5 - Topics 2019-06-04 20:58:12 +03:00
.gitignore Rust: Tutorial 1 - Hello, World 2019-06-04 17:56:46 +03:00
README.md Rust: Renaming and readme cleanup 2019-06-04 21:03:17 +03:00

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.

Tutorial one: "Hello World!"

cd 01-hello-world
cargo run --bin receive
cargo run --bin send

Tutorial two: Work Queues

cd 02-work-queues
cargo run --bin worker
cargo run --bin new-task "hi" # specify a custom message

Tutorial three: Publish/Subscribe

cd 03-publish-subscribe
cargo run --bin subscribe
cargo run --bin publish "hi" # specify a custom message

Tutorial four: Routing

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

Tutorial five: Topics

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