An open API service indexing awesome lists of open source software.

https://github.com/smartrecruiters/rabbitr

CLI tool for easier management of RabbitMQ related tasks
https://github.com/smartrecruiters/rabbitr

admin cli go master-pipeline rabbitmq rabbitmq-management

Last synced: about 1 year ago
JSON representation

CLI tool for easier management of RabbitMQ related tasks

Awesome Lists containing this project

README

          


rabbitr



Build
Software License
Go Report Card
Go Doc

- [Rabbitr](#rabbitr)
- [Implemented features](#implemented-features)
- [Installation](#installation)
- [Tapping the repo](#tapping-the-repo)
- [Installing](#installing)
- [Configuration](#configuration)
- [Usage](#usage)
- [Advanced filtering](#advanced-filtering)


# Rabbitr

Small CLI application written in GoLang for easier management of RabbitMQ related tasks.


## Implemented features

- connections
- [x] list
- [x] close
- messages
- [x] download
- [x] upload
- [x] move
- queue
- [x] list
- [x] purge
- [x] sync
- [x] delete
- exchange
- [x] list
- [x] delete
- server
- [x] add
- [x] delete
- [x] list
- shovels
- [x] delete
- [x] list
- policies
- [x] list


## Installation


#### Tapping the repo
`brew tap smartrecruiters/public-homebrew-taps git@github.com:smartrecruiters/public-homebrew-taps.git`


#### Installing
`brew update && brew install rabbitr`


## Configuration
After downloading or building the source code `rabbitr` application needs to be configured with coordinates to
RabbitMQ servers that it will operate on. It uses REST API when communicating with RabbitMQ server.
To add server configuration invoke:

`rabbitr server add -s my-server-name -api-url http://localhost:15672 -u user -p pass`

After the server has been configured it can be used in context of other commands such as `queues`


## Usage
Each command comes with a description and examples. Start with `rabbitr -h` to check all the commands.
Lower level commands provide their own usage, for example `rabbitr queues -h` or `rabbitr queues list -h`

!["Example flow"](rabbitr-demo.gif)

Example commands:

```
rabbitr server add -s my-server-name -api-url http://localhost:15672 -amqp-url amqp://localhost:5672 -u user -p pass
rabbitr queues list -s my-server-name
rabbitr queues sync -s my-server-name
rabbitr queues list -s my-server-name --filter="queue.Consumers==0"
rabbitr queues list -s my-server-name --filter="queue.Consumers==0 && queue.Messages>=200"
rabbitr queues purge -s my-server-name --filter="queue.Consumers==0 && queue.Messages>=200"
rabbitr messages move -s my-server-name --src-vhost vhost1 --src-queue test-queue --duplicate"
rabbitr messages download -s my-server-name -v vhost1 --queue "sample-queue" --output-dir /tmp --verbose --max-messages=100
rabbitr messages upload -s my-server-name -v vhost1 --queue "sample-queue-new" --input-dir /tmp --confirm --max-messages=100
```


## Advanced filtering
Rabbitr uses [goevaluate](https://github.com/Knetic/govaluate#govaluate) library for dynamic filtering of the resources.
It can be useful to determine list of subjects that match given criteria.
It allows for creating flexible conditions considering for example only queues with particular name, vhost, defined number of consumers or messages.
Check command descriptions for a list of properties available for use on given resource type.