Skip to main content

A simple test script to test a RabbitMQ cluster

Project description

RabbitMQ-Test-Tool

Lint Publish Python Package PyPI version rabbitmq-test-tool rabbitmq-test-tool GitHub issues GitHub pull requests

Get it from the Snap Store

This repository contains a simple test script to test a RabbitMQ cluster.

Usage

Let's say we have a RabbitMQ cluster at IP address 10.5.0.{1,2,3}. Prepare the cluster by running:

./prepare-rabbit.sh 10.5.0.1

This script will create a test user and a test vhost. Detailed usage is:

Usage:

prepare-rabbit.sh [options] BROKER

Where BROKER is the address of the RabbitMQbroker to prepare.

Options:

--user USER       The username to set
--password PASS   The password for USER
--vhost VHOST     The vhost to create

Set up a virtualenv to run the actual test script:

virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
python setup.py install

Now send a message:

rabbitmq-test-tool 10.5.0.1 --send "My first message"

Full usage:

usage: rabbitmq-test-tool [-h] [--durable] [--queue QUEUE] [--send MSG] [--get]
                          [--list] [--user USER] [--password PASSWORD]
                          [--vhost VHOST] [--delete QUEUE]
                          BROKER [BROKER ...]

positional arguments:
  BROKER               The IP address or hostname of the broker, default =
                       localhost

optional arguments:
  -h, --help           show this help message and exit
  --durable
  --queue QUEUE        The queue to use, default = test_queue
  --send MSG           Send MSG to queue
  --get                Get one message from queue
  --list               List messages in queue
  --user USER          The user to use for the RabbitMQ connection, default =
                       tester
  --password PASSWORD  The password to use for the RabbitMQ connection,
                       default = linux
  --vhost VHOST        The vhost to use for the RabbitMQ connection, default =
                       tester
  --delete QUEUE       Delete QUEUE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RabbitMQ Test Tool-1.1.7.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

RabbitMQ_Test_Tool-1.1.7-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page