metalmq
is under development, it is not feature complete but you can try and run with cargo run.
cargo run --bin metalmq
## or to enable logs
RUST_LOG=debug cargo run --bin metalmq
RUST_LOG=metalmq=trace cargo run --bin metalmq
To run tests it is recommended to install nextest runner because of the exclusions of integration tests requires MetalMQ to run.
cargo nextest run -E 'not binary_id(metalmq::it) and not binary_id(metalmq-client::it)'
Integration tests also can be run with normal test runner by
cargo test --package metalmq --test it
cargo test --package metalmq-client --test it
To have coverage of the server tests run llvm-cov
cargo install cargo-llvn-cov
cargo llvm-cov nextest --package metalmq --bins
cargo llvm-cov report --html
open target/llvm-cov/html/index.html
There are some examples in the examples
directory, they implement simple scenarios of the
metalmq-client
library. To run execute
RUST_LOG=metalmq_client=trace cargo run --example publish-consume
For AMQP compliance we use pika
Python library and pytest
framework to be to validate
the comformance of metalmq server.
cd amqp-compliance
pytest
Method | Field |
---|---|
connection. | |
channel. | |
exchange.declare | ✅ exchange |
❌ type | |
✅ passive | |
❌ durable (no persistence) | |
❓ arguments | |
queue.declare | ✅ queue |
✅ passive | |
❓ durable | |
✅ exclusive | |
✅ auto-delete | |
basic.ack | ✅ |
In metalmq-client
there is a Rust async client which implements part of the AMQP 0.9.1 protocol.
You can try agains metalmq
server or rabbitmq
.
#docker run -p 5672:5672 -p 15672:15672 --rm rabbitmq:3-management
cargo test --lib metalmq-client
In order to validate AMQP packages we also need a stable AMQP client implementation which is
the pika
. It runs on Python, so one need to install pipenv
to run that.
cd amqp-compliance
python3 -m venv ~/.venv
source ~/.venv/bin/activate
~/.venv/bin/pytest
In the examples the publish-consume test has dependency on the tokio console.
RUST_BACKTRACE=1 RUSTFLAGS="--cfg tokio_unstable" cargo +nightly run --bin metalmq --features tracing
RUSTFLAGS="--cfg tokio_unstable" cargo run --example publish-consume