rabbitmq-tutorials/rust
2019-06-04 20:41:22 +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: Tutorial 4 - Routing 2019-06-04 20:41:22 +03:00
04-routing Rust: Tutorial 4 - Routing 2019-06-04 20:41:22 +03:00
.gitignore Rust: Tutorial 1 - Hello, World 2019-06-04 17:56:46 +03:00
README.md Rust: Tutorial 4 - Routing 2019-06-04 20:41:22 +03:00

Rust code for RabbitMQ tutorials

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

The examples use lapin client library.

To successfully use the examples you will need a running RabbitMQ server.

Requirements

Code

Each tutorial is a separate crate where each source file corresponds to a binary executable.

Tutorial one: "Hello World!"

cd 01-hello-world

Start receiver and sender in two separate shells:

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

Tutorial two: Work Queues

cd 02-work-queues

Start workers and task creator in separate shells:

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

Tutorial three: Publish/Subscribe

cd 03-publish-subscribe

Start receiver and emitter in separate shells:

cargo run --bin receive
cargo run --bin emit "hi" # specify a custom message

Tutorial four: Routing

cd 04-routing

Start receiver and emitter in separate shells:

cargo run --bin receive info error # specify log levels
cargo run --bin emit-direct error "help!" # specify severity and custom message

Tutorial five: Topics

// TODO

Tutorial six: RPC