Code Monkey home page Code Monkey logo

rabbitmq-test-tool's Introduction

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

rabbitmq-test-tool's People

Contributors

nicolasbock avatar

Watchers

 avatar  avatar  avatar

Forkers

joussy

rabbitmq-test-tool's Issues

Messages sent to an OpenStack queue get lost

When sending a message to an OpenStack queue:

$ rabbitmq-test-tool 10.5.3.222 \
  --user nova \
  --password R5gjm6y67yFFb7Rxxfm9T98ytG6L9rjGLWGccxcYPXG9r7jsngsmwgj33CRV9753 \
  --vhost openstack \
  --queue q-l3-plugin \
  --send 'test'
sending one message

The message is not stored in the queue:

$ rabbitmq-test-tool 10.5.3.222 \
  --user nova \
  --password R5gjm6y67yFFb7Rxxfm9T98ytG6L9rjGLWGccxcYPXG9r7jsngsmwgj33CRV9753 \
  --vhost openstack \
  --queue q-l3-plugin \
  --list
message list on broker 10.5.3.222

On the RabbitMQ side we get:

=WARNING REPORT==== 9-Sep-2020::18:23:47 ===
closing AMQP connection <0.21794.0> (10.5.0.16:45122 -> 10.5.3.222:5672, vhost: 'openstack', user: 'nova'):
client unexpectedly closed TCP connection

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.