Git Product home page Git Product logo

rmq's Introduction

rmq is a command line Swiss army knife for sending and receiving messages to and from RabbitMQ.

Build Status Download

Examples

To send a random message to a queue:

$ rmq -d in -c 1 -k foo
2014-27-03 02:36:08.673 - sender connected to localhost
2014-27-03 02:36:08.674 - [296291375195656193] sending 1.00 kB (91f17fdc)

To receive messages from a queue:

$ rmq -d out -q foo
2014-27-03 02:35:54.500 - receiver connected to localhost
2014-27-03 02:35:54.504 - receiver (fLnW) subscribed to queue foo (prefetch=0)
2014-27-03 02:36:08.676 - [fLnW] 296291375195656193 receiving 1.00 kB (91f17fdc) @ 1.14 ms

To send a JSON message to a queue using command line arguments:

$ rmq -d in -c 1 -k foo foo=x bar=y
2014-25-07 11:13:58.594 - sender connected to 127.0.0.1
2014-25-07 11:13:58.595 - [339711942334386177] sending 0.02 kB (eb07f4ad)

The space separated key value pairs are delimited by an = sign.

To get (very) basic info about the server:

$ rmq -I
RabbitMQ Server 3.2.4

Features

  • Send and receive random messages to RabbitMQ from the command line
  • Send JSON message payloads using command line arguments
  • Send an arbitrary number of messages
  • Specify the average size and standard deviation of the messages to send
  • Concurrent sending receiving in either separate AMQP connections or channels or both
  • Crude send rate throttling
  • Crude consumer latency simulation
  • Setting the prefetch length for consumers
  • Consumer tags can be used to correlate log output with RabbitMQ management
  • Use persistent messaging as an option
  • Prints latency metrics for round trip operations
  • Deep entropy analysis for sending and receiving messages
  • Optionally auto-re-subscribe to cancelled subscriptions (e.g. with mirrored queues)

Installation

On OSX you can use Homebrew to install rmq:

$ brew tap relops/homebrew-rmq
$ brew install rmq

On Linux and OSX, you can download the binary: Download

If your platform is not covered here, please get in touch and we can probably cross-compile it for you.

Options

$ rmq -h
Usage:
  rmq [OPTIONS]

Application Options:
  -Q, --queue-info=      List queues
  -d, --direction=       Use rmq to send (-d in) or receive (-d out) messages
  -x, --exchange=        The exchange to send to (-d in) or bind a queue to when receiving (-d out)
  -q, --queue=           The queue to receive from (when used with -d in)
  -T, --persistent       Use persistent messaging (false)
  -n, --no-declare       If set, then don't attempt to declare the queue or bind it (false)
  -f, --prefetch=        The number of outstanding acks a receiver will be limited to, default of 0 means unbounded (0)
  -y, --priority=        The relative priority for receiving messages (0)
  -G, --global-prefetch  Whether to share the prefetch limit accross all consumers of a channel (false)
  -k, --key=             The key to use for routing (-d in) or for queue binding (-d out)
  -c, --count=           The number of messages to send (10)
  -i, --interval=        The delay (in ms) between sending or receiving messages (0)
  -D, --delete           If set, it will remove the object specified by the -q or -a argument (false)
  -I, --info             If set, print basic server info (requires management API to be installed on the server) (false)
  -g, --concurrency=     The number of processes per connection (1)
  -m, --connections=     The number of connections to use (1)
  -z, --size=            Message size in kB (1)
  -t, --stddev=          Standard deviation of message size (0)
  -R, --replication=     The number of nodes to replicate queues to (0)
  -N, --nodes=           The nodes to apply the command to (use with -a)
  -A, --ha=              HA information
  -a, --ha-name=         The HA policy name to use when creating a policy
  -r, --renew            Automatically resubscribe when the server cancels a subscription (used for mirrored queues) (false)
  -u, --user=            The user to connect as (guest)
  -w, --pass=            The user's password (guest)
  -H, --host=            The Rabbit host to connect to (127.0.0.1)
  -p, --port=            The Rabbit port to connect on (5672)
  -P, --management-port= The Rabbit HTTP management port to connect on (15672)
  -e, --entropy          Display message level entropy information (false)
  -V, --version          Print rmq version and exit
  -v, --verbose          Show verbose debug information

Help Options:
  -h, --help             Show this help message

Arguments:
  MessageBody

Roadmap

In no particular order:

  • Integration with the RabbitMQ management API
  • Rate limting
  • Flow control

License

The MIT License (MIT)

Copyright (c) [2014] [RelOps Ltd]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

rmq's People

Contributors

0x6e6562 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

apet gitmustashio

rmq's Issues

Pull requests should not include push to bintray

Right now pull requests will fail because by default, the build automatically pushes the build artifacts to binary, which requires an encrypted key, which the PR submitter will not be in possession of. Apart from which, only master builds should push out to bintray. So we need to patch the Travis descriptor to differentiate master builds versus pull request builds.

SHA256 Mismatch on brew install

When running brew install rmq
Error: SHA256 mismatch
Expected: 456997ae87b394a31be14f33eb7f3fa48b84610c5e094273b4414ba3efc01e98
Actual: 70563037b3e42f79066fdc0b600d964aa621ed8e7c8feb2edcb7be4464052ac1

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.