Here you can find the Rust code examples for RabbitMQ tutorials.
The examples use amqprs client library.
These tutorials assume a RabbitMQ server node running locally using default ports.
Each cargo command should be launched in a separate shell.
cargo run --bin receive
cargo run --bin send
cargo run --bin worker
cargo run --bin new_task "hi" # specify a custom message
cargo run --bin receive_logs
cargo run --bin emit_log "hi" # specify a custom message
cargo run --bin receive_logs_direct info error # specify log levels
cargo run --bin emit_log_direct error "help!" # specify severity and custom message
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