Erlang application for testing RabbitMQ Cluster (and quorum queues).
- Docker
- Erlang 25
# Example installation steps
git clone [email protected]:smiroha/tuna.git master
cd tuna
gmake# Example local launch application steps
gmake ; _rel/tuna_release/bin/tuna_release console# Example local launch Rabbit cluster steps
docker compose -f ./build/docker-compose.yaml down -v ; docker compose -f ./build/docker-compose.yaml up# Chaos test (Pumba + network issues)
# For Docker Desktop (macOS), set Docker socket path and free host ports:
DOCKER_HOST_SOCKET=$HOME/.docker/run/docker.sock \
RMQ_AMQP_PORT=5673 RMQ_MGMT_PORT=15673 \
docker compose -f ./build/docker-compose.yaml up -d --build- Prometheus:
http://localhost:9090 - Pushgateway:
http://localhost:9091 - Grafana:
http://localhost:3000(admin/admin) - Preloaded dashboard:
RabbitMQ: Classic vs Quorum - Preloaded dashboard:
RabbitMQ Reliability (Classic vs Quorum)
- Start infra (
RabbitMQ + chaos + monitoring):
DOCKER_HOST_SOCKET=$HOME/.docker/run/docker.sock \
RMQ_AMQP_PORT=5673 RMQ_MGMT_PORT=15673 \
docker compose -f ./build/docker-compose.yaml up -d --build- Start Erlang load app (multi publisher + classic/quorum consumers + metrics push):
# if RMQ_AMQP_PORT is not 5672, update {amqp_port, ...} in config/sys.config
gmake ; _rel/tuna_release/bin/tuna_release console- Watch Grafana dashboard
RabbitMQ Reliability (Classic vs Quorum)and compare:
publish confirm ack/nack/returnconsumer gaps/duplicates/redeliveredpublisher inflight
The local release reads config/sys.config.
{tuna, [
{amqp, [
{host, "localhost"},
{port, 5672},
{publisher, [
{interval, 25},
{size, 1}
]}
]},
{metrics, [
{interval, 5000},
{url, "http://localhost:9091/metrics/job/tuna/instance/local"},
{run_id, "local"}
]},
{process_counts, [
{publishers, 3},
{classic_consumers, 5},
{quorum_consumers, 5}
]}
]}.All app metrics include a run_id label. Connection lifecycle metrics are exposed as:
tuna_amqp_connect_total{role="...",worker="...",target="conn",run_id="..."}tuna_amqp_down_total{role="...",worker="...",target="conn|chan",run_id="..."}
- Redesign publisher: split publisher and message generator processes