{"id":13451604,"url":"https://github.com/vsdmars/rmqctl","last_synced_at":"2025-03-23T19:32:12.422Z","repository":{"id":57488432,"uuid":"166908341","full_name":"vsdmars/rmqctl","owner":"vsdmars","description":"rmqctl, the swiss-army knife tooling for rabbitmq","archived":false,"fork":false,"pushed_at":"2019-03-19T00:24:25.000Z","size":5255,"stargazers_count":31,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"v1","last_synced_at":"2024-07-02T14:46:09.156Z","etag":null,"topics":["automation","golang","rabbitmq","tooling"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsdmars.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-22T01:49:52.000Z","updated_at":"2024-07-01T09:07:07.000Z","dependencies_parsed_at":"2022-08-29T13:31:51.393Z","dependency_job_id":null,"html_url":"https://github.com/vsdmars/rmqctl","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsdmars%2Frmqctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsdmars%2Frmqctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsdmars%2Frmqctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsdmars%2Frmqctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsdmars","download_url":"https://codeload.github.com/vsdmars/rmqctl/tar.gz/refs/heads/v1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213325034,"owners_count":15570223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","golang","rabbitmq","tooling"],"created_at":"2024-07-31T07:00:56.866Z","updated_at":"2024-07-31T07:03:41.104Z","avatar_url":"https://github.com/vsdmars.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"rmqctl_\n-------\n\n.. All external links are here\n.. _rmqctl: https://github.com/vsdmars/rmqctl\n.. _rmqctl.conf: ./rmqctl.conf\n.. _rabbitmq_tls.config: ./example/rabbitmq_tls.config\n.. |travis| image:: https://api.travis-ci.org/vsdmars/rmqctl.svg?branch=v1\n  :target: https://travis-ci.org/vsdmars/rmqctl\n.. |go report| image:: https://goreportcard.com/badge/github.com/vsdmars/rmqctl\n  :target: https://goreportcard.com/report/github.com/vsdmars/rmqctl\n.. |go doc| image:: https://godoc.org/github.com/vsdmars/rmqctl?status.svg\n  :target: https://godoc.org/github.com/vsdmars/rmqctl\n.. |license| image:: https://img.shields.io/github/license/mashape/apistatus.svg?style=flat\n  :target: ./LICENSE\n.. |release| image:: https://img.shields.io/badge/release-v1.0.15-blue.svg\n  :target: https://github.com/vsdmars/rmqctl/tree/v1.0.15\n.. _binary release v1.0.0: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.0\n.. _binary release v1.0.3: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.3\n.. _binary release v1.0.7: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.7\n.. _binary release v1.0.8: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.8\n.. _binary release v1.0.9: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.9\n.. _binary release v1.0.10: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.10\n.. _binary release v1.0.11: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.11\n.. _binary release v1.0.12: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.12\n.. _binary release v1.0.14: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.14\n.. _binary release v1.0.15: https://github.com/vsdmars/rmqctl/releases/tag/v1.0.15\n\n.. ;; And now we continue with the actual content\n\n|travis| |go report| |go doc| |license| |release|\n\n----\n\nrmqctl is *the* swiss-army knife tool for rabbitmq with kubectl like commands.\n\n----\n\n\nBinary Release:\n---------------\n\n`binary release v1.0.15`_\n - 'rmqctl publish' now publishes input from STDIN.\n - 'rmqctl publish' -e flag now takes executable with arguments.\n\n e.g -e \"/usr/bin/ls -al\"\n\n\n\n`binary release v1.0.14`_\n - 'rmqctl publish' adds new flag '-e' for user provided executable,\n\n   which generates messages to 'stdout' where rmqctl consumes and publishes to the queue.\n\n\n`binary release v1.0.12`_\n - fix issues for rabbit-hole.DeleteBinding uses BindingInfo.PropertiesKey as routing key\n\n instead of BindingInfo.RoutingKey\n\n - reference:\n      https://github.com/michaelklishin/rabbit-hole/blob/master/bindings.go#L193\n      https://cdn.rawgit.com/rabbitmq/rabbitmq-management/v3.7.12/priv/www/api/index.html\n      /api/bindings/vhost/e/exchange/q/queue/props\n\n\n`binary release v1.0.11`_\n - Logging bug fix\n\n\n`binary release v1.0.10`_\n - Purge queue / purge queue with prompt [y/n]\n - Consume queue with numbers, e.g only consumes 10 messages\n\n\n`binary release v1.0.9`_\n - honors -a, -d in create queue/exchange\n\n\n`binary release v1.0.8`_\n - Now supports TLS connection for AMQP and HTTPS\n - New 'tls' entry in rmqctl.conf_\n - New flag '-T' indicates using TLS connection.\n - Bug fix.\n\n\n`binary release v1.0.7`_\n - Now supports burst message publish mode.\n\n   Alone with daemon mode, rmqctl is used as a stress test tool for rabbitmq.\n\n   e.g.\n    $ rmqctl publish exchange_name routing_key \"MESSAGE\" -b 1000000\n\n   Publish with other payload\n    $ rmqctl publish exchange_name routing_key \"$(cat payload.json)\" -b 1000000\n\n - Now supports publish mode: Transient, Persistent\n - Change default config file name to *rmqctl.conf*\n - Change load config file name flag to '-c'\n - Formalize debug log message.\n\n`binary release v1.0.3`_\n - Publish/Consume use amqp protocol for performance.\n   Other actions using rabbitmq REST API calls.\n - Now supports bash/rawjson output format.\n\n`binary release v1.0.0`_\n - init. release\n\n\nrmqctl.conf_\n-------------\n\nrmqctl loads rmqctl.conf (yaml) under working directory if there is one.\nCommand arguments have higher precedence if provided.\n\n.. code:: yaml\n\n   username: guest\n   password: guest\n   port: 5672\n   apiport: 15672\n   host: localhost\n   tls: true\n   vhost: \"/\"\n\n\n::\n\n Loads rmqctl.conf from other location\n $ rmqctl -c path/to/rmqctl.conf COMMANDS\n\n\n=========\nSupports\n=========\n\nAMQP Protocol\n-------------\nrmqctl_ uses amqp protocol library for publish/consume message for speed.\n\nrmqctl_ supports burst publish/daemon consume, act as a perfect tool for stress test\n\nand debugging the application.\n\n\nTLS support\n-----------\nPlace client certificate and private key pair with read only permission (0400)\n\nunder $HOME/.ssh/ name as follows:\n\n\n::\n\n   ~/.ssh/rmq_cert.pem\n   ~/.ssh/rmq_key.pem\n\n\nIf rabbitmq server using self-signed certificate,\n\nremember to register self-signed CA into client's host system.\n\nSetting up rabbitmq server TLS support for both\n\nAMQP and API Service config file can refere to example:\n\nrabbitmq_tls.config_\n\n\n\nCreate\n------\n- queue, queue in HA mode(with single command)\n- exchange\n- queue/exchange binding\n- user\n- vhost\n- --help for more features\n\n\nList\n----\n- queue\n- exchange\n- queue/exchange binding\n- user\n- vhost\n- node\n- policy\n- --help for more features\n\n\nDelete\n------\n- queue\n- exchange\n- queue/exchange binding\n- user\n- vhost\n- policy\n- --help for more features\n\n\nUpdate\n------\n- vhost\n- user\n- --help for more features\n\n\nPublish\n-------\n- Publish with routing key\n- Publish messages generated from user provided executable\n- Burst publishing (testing throughput)\n- Supports transient|persistent modes\n- --help for more features\n\n\nConsume\n-------\n- Consume supports ack|nack|reject|auto-ack acknowledge modes.\n- Run as daemon, consume on-demand.\n- Consume number of messages with flag -c NUMBER\n- --help for more features\n\n\nPurge\n-----\n- Purge queue with prompt\n- --help for more features\n\n\n=====\nUsage\n=====\n\nCreate queue\n------------\n\n::\n\n   // TEST_QUEUE_1 created as durable\n   $ rmqctl create queue TEST_QUEUE_1 -d\n   done\n\n   // TEST_QUEUE_2 created as durable and autodelete\n   $ rmqctl -d create queue TEST_QUEUE_2 -d -a\n   done\n\n\nCreate queue in HA mode\n-----------------------\n\nrmqctl is able to create queue in HA mode.\n\nThree modes supported: all(default),exactly,nodes\n\nFollowing command creates TEST_QUEUE_3 queue in HA mode,\n\nwhich by default it has queue slaves in all other rabbitmq nodes (default: 'all' mode)\n\nrmqctl automatically creates queue's HA policy with name: QueueName_HA\n\n::\n\n   $ rmqctl create queue TEST_QUEUE_3 --HA\n   done\n\n\nList all queues\n---------------\n\n::\n\n   $ rmqctl list queue\n   |Name         |Vhost |Durable |AutoDelete |MasterNode |Status |Consumers |Policy          |Messages\n   |TEST_QUEUE_1 |/     |true    |false      |rabbit@r1  |       |0         |                |0\n   |TEST_QUEUE_2 |/     |true    |true       |rabbit@r1  |       |0         |                |0\n   |TEST_QUEUE_3 |/     |true    |true       |rabbit@r1  |       |0         |TEST_QUEUE_3_HA |0\n\n\nList Policy\n-----------\n\n::\n\n   $ rmqctl list policy\n    Name            |Vhost |Pattern      |Priority |ApplyTo |Definition\n   |TEST_QUEUE_3_HA |/     |TEST_QUEUE_3 |0        |queues  |map[ha-mode:all ha-sync-mode:automatic]\n\n\nList particular queue in json\n-----------------------------\n\n::\n\n   $ rmqctl list queue TEST_QUEUE_1 -o json\n\n.. code:: json\n\n   [\n     {\n       \"name\": \"TEST_QUEUE_1\",\n       \"vhost\": \"/\",\n       \"durable\": true,\n       \"auto_delete\": false,\n       \"arguments\": {},\n       \"node\": \"rabbit@r1\",\n       \"status\": \"\",\n       \"memory\": 10576,\n       ...\n       }\n    ]\n\n\nCreate exchange\n---------------\n\n::\n\n  $ rmqctl create exchange TEST_EXCHANGE_1 -d -t fanout\n  done\n\n\nList all exchanges\n------------------\n\n::\n\n  $ rmqctl list exchange\n   |Name               |Vhost |Type    |Durable |AutoDelete\n   |                   |/     |direct  |true    |false\n   |TEST_EXCHANGE_1    |/     |fanout  |true    |false\n   |amq.direct         |/     |direct  |true    |false\n   |amq.fanout         |/     |fanout  |true    |false\n   |amq.headers        |/     |headers |true    |false\n   |amq.match          |/     |headers |true    |false\n   |amq.rabbitmq.trace |/     |topic   |true    |false\n   |amq.topic          |/     |topic   |true    |false\n\n\nList particular exchange in json\n--------------------------------\n\n::\n\n   $ rmqctl list exchange TEST_EXCHANGE_1 -o json\n\n.. code:: json\n\n   {\n     \"name\": \"TEST_EXCHANGE_1\",\n     \"vhost\": \"/\",\n     \"type\": \"fanout\",\n     \"durable\": true,\n     \"auto_delete\": false,\n     \"internal\": false,\n     \"arguments\": {},\n     \"incoming\": [],\n     \"outgoing\": []\n   }\n\n\nCreate queue/exchange binding\n-----------------------------\n\nrmqctl is able to create exchange bindings as well.\n\n::\n\n  $ rmqctl create bind TEST_EXCHANGE_1 TEST_QUEUE_1 ROUTING_KEY\n  done\n  $ rmqctl create bind TEST_EXCHANGE_1 TEST_QUEUE_2 ROUTING_KEY\n  done\n\n  Creates exchange binding\n  $ rmqctl create bind TEST_EXCHANGE_1 TEST_EXCHANGE_2 ROUTING_KEY -t exchange\n  done\n\n\nList queue/exchange binding\n---------------------------\n\n::\n\n  $ rmqctl list bind\n  |Source          |Destination     |Vhost |Key          |DestinationType\n  |                |TEST_QUEUE_1    |/     |TEST_QUEUE_1 |queue\n  |                |TEST_QUEUE_2    |/     |TEST_QUEUE_2 |queue\n  |TEST_EXCHANGE_1 |TEST_QUEUE_1    |/     |RUN          |queue\n  |TEST_EXCHANGE_1 |TEST_EXCHANGE_2 |/     |RUN          |exchange\n\n\nPublish message\n---------------\n\nPublish to a fanout exchange, observing queues bounded to the\n\nexchange *TEST_EXCHANGE_1* received the message.\n\n::\n\n   $ rmqctl publish TEST_EXCHANGE_1 RUN \"This is a test message\"\n   done\n\n   $ rmqctl list queue\n   |Name         |Vhost |Durable |AutoDelete |MasterNode |Status |Consumers |Policy          |Messages\n   |TEST_QUEUE_1 |/     |true    |false      |rabbit@r1  |       |0         |                |1\n   |TEST_QUEUE_2 |/     |true    |true       |rabbit@r1  |       |0         |                |1\n   |TEST_QUEUE_3 |/     |true    |true       |rabbit@r1  |       |0         |TEST_QUEUE_3_HA |0\n\n\nPublish message in burst mode\n-----------------------------\n\nPublish to a fanout exchange in burst mode,\n\nobserving queues bounded to the exchange *TEST_EXCHANGE_1* received the message.\n\n::\n\n   $ rmqctl publish TEST_EXCHANGE_1 RUN \"This is a test message\" -b 424242\n   done\n\n   $ rmqctl list queue\n   |Name         |Vhost |Durable |AutoDelete |MasterNode |Status |Consumers |Policy          |Messages\n   |TEST_QUEUE_1 |/     |true    |false      |rabbit@r1  |       |0         |                |424243\n   |TEST_QUEUE_2 |/     |true    |true       |rabbit@r1  |       |0         |                |424243\n   |TEST_QUEUE_3 |/     |true    |true       |rabbit@r1  |       |0         |TEST_QUEUE_3_HA |0\n\n\nPublish message from user provided executable\n---------------------------------------------\n\nPublish messages generated from user provided executable to the queue.\n\n::\n\n   $ rmqctl publish TEST_EXCHANGE_1 RUN -e \"/usr/bin/ls -al\"\n   done\n\n   $ rmqctl consume TEST_QUEUE_1\n   |Message\n    drwxr-xr-x 1 vs   users    1566 Mar 16 13:07 Desktop\n    drwxr-xr-x 1 vs   users       0 Feb 11 21:25 Documents\n    drwxr-xr-x 1 vs   users     616 Mar 17 15:34 Downloads\n    drwxr-xr-x 1 vs   users     322 Feb 13 08:40 .fzf\n\n\nPublish message from STDIN\n--------------------------\n\nPublish messages read from STDIN.\n\n::\n\n   $ rmqctl publish TEST_EXCHANGE_1 RUN\n   hello, rabbitmq!\n   greetings, rabbitmq!\n   done\n\n   $ rmqctl consume TEST_QUEUE_1\n   |Message\n    hello, rabbitmq!\n    greetings, rabbitmq!\n\n   $ rmqctl publish TEST_EXCHANGE_1 RUN  \u003c\u003c\u003c \"hi, there!\"\n   done\n\n   $ rmqctl consume TEST_QUEUE_1\n   |Message\n    hi, there!\n\n   equivalent to $ rmqctl publish TEST_EXCHANGE_1 RUN -e \"/usr/bin/ls -al\"\n   $ ls -al | rmqctl publish TEST_EXCHANGE_1 RUN\n   done\n\n   $ rmqctl consume TEST_QUEUE_1\n   |Message\n    drwxr-xr-x 1 vs   users    1566 Mar 16 13:07 Desktop\n    drwxr-xr-x 1 vs   users       0 Feb 11 21:25 Documents\n    drwxr-xr-x 1 vs   users     616 Mar 17 15:34 Downloads\n    drwxr-xr-x 1 vs   users     322 Feb 13 08:40 .fzf\n\n\nConsume message\n---------------\nConsume 3 messages.\n\n::\n\n   $ rmqctl consume TEST_QUEUE_1 -c 3\n   |Message\n   This is a test message\n   This is a test message\n   This is a test message\n\n\n\nConsume message in daemon mode\n------------------------------\n\n::\n\n   $ rmqctl consume TEST_QUEUE_2 -d\n   |Message\n   This is a test message\n   This is a test message\n   ...\n\n\nPurge queue\n-----------\nPurge queue without prompt.\n\n::\n\n   $ rmqctl purge TEST_QUEUE_1 -f\n   done\n\n\n\nOther features including list/update user/vhost/node information, vhost tracing, etc.\n-------------------------------------------------------------------------------------\n--help for more details.\n\n::\n\n   $ rmqctl --help\n\n\nContact\n-------\nBug, feature requests, welcome to shoot me an email at:\n\n**vsdmars\u003c\u003cat\u003e\u003egmail.com**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsdmars%2Frmqctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsdmars%2Frmqctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsdmars%2Frmqctl/lists"}