{"id":16889046,"url":"https://github.com/algesten/rabbiteer-rs","last_synced_at":"2025-03-22T08:30:59.529Z","repository":{"id":57658407,"uuid":"75571171","full_name":"algesten/rabbiteer-rs","owner":"algesten","description":"AMQP input/output cli tool","archived":false,"fork":false,"pushed_at":"2019-03-26T20:38:19.000Z","size":84,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T10:01:42.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/algesten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-04T23:21:46.000Z","updated_at":"2022-12-08T13:51:32.000Z","dependencies_parsed_at":"2022-09-16T04:41:12.880Z","dependency_job_id":null,"html_url":"https://github.com/algesten/rabbiteer-rs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algesten%2Frabbiteer-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algesten%2Frabbiteer-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algesten%2Frabbiteer-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algesten%2Frabbiteer-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algesten","download_url":"https://codeload.github.com/algesten/rabbiteer-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931450,"owners_count":20534007,"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":[],"created_at":"2024-10-13T16:55:20.879Z","updated_at":"2025-03-22T08:30:59.153Z","avatar_url":"https://github.com/algesten.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rabbiteer for Rust\n==================\n\nCLI tool for publishing and subscribing to RabbitMQ.\n\n## Install\n\nInstall Cargo (Rust).\n\n    $ brew install rust\n\nInstall rabbiteer.\n\n    $ cargo install rabbiteer\n\n## Command format\n\nThe command has two \"modes\", `publish` and `subscribe`.\n\n    $ rabbiteer [general opts] publish/subscribe [specific opts]\n\n### General options\n\n\n    $ rabbiteer --help\n    ...\n    OPTIONS:\n        -h, --host \u003chost\u003e            RabbitMQ host [default: 127.0.0.1]\n        -p, --password \u003cpassword\u003e    Password to authenticate with [default: guest]\n        -P, --port \u003cport\u003e            Port to connect to [default: 5672]\n        -U, --url \u003curl\u003e              AMQP connection url (amqp://user:pass@host:port/vhost)\n        -u, --user \u003cuser\u003e            User to authenticate with [default: guest]\n        -v, --vhost \u003cvhost\u003e          Virtual host [default: ]\n\n### Environment variables\n\n#### AMQP_URL\n\nThe connection string can be set using the `AMQP_URL` environment\nvariable.\n\n```\n$ export AMQP_URL=\"amqp://joe:secret@myspecialhost/somevhost\"\n$ rabbiteer subscribe -e ttninjs-batch\n```\n\n#### CONF file\n\nThe connection can be specified in a JSON file pointed out by `CONF`\nenvironment variable.\n\n```\n$ cat conf-localhost.json\n{\n    \"amqp\": {\n        \"connection\": {\n            \"host\": \"localhost\",\n            \"vhost\": \"docker\",\n            \"login\": \"admin\",\n            \"password\": \"admin\"\n        }\n    }\n}\n$ export CONF=conf-localhost.json\n$ rabbiteer subscribe -e ttninjs-batch\n```\n\n## Publish\n\nPublishing pushes data from stdin or a file to an exchange.\n\n\n    $ rabbiteer publish --help\n    ...\n    FLAGS:\n        --rpc        Publish as RPC with replyTo and wait for reply.\n    OPTIONS:\n        -c, --content-type \u003ccontent_type\u003e    Content type such as application/json. Inferred from filename if\n                                             possible.\n        -e, --exchange \u003cexchange\u003e            Exchange to publish to [default ]\n        -f, --file \u003cfile\u003e                    Filename (- is stdin) [default: -]\n        -H, --header \u003cheader\u003e...             Header on the form \"My-Header: Value\"\n        -r, --routing-key \u003crouting_key\u003e      Routing key [default: ]\n        -z, --priority \u003cpriority\u003e            Priority\n        -t, --rpctimeout \u003crpctimeout\u003e        RPC timeout in milliseconds\n\n### Example\n\n#### From stdin\n\nProvide the content-type as arg.\n\n    $ echo \"{\\\"panda\\\":true}\" | \\\n        rabbiteer -u admin -p admin -v prod publish -e myexchange -c application/json\n\n#### From a file\n\nContent-type is inferred if possible.\n\n    $ rabbiteer -u admin -p admin -v prod publish -e myexchange -H \"batch: true\" -f ./foo.json\n\n#### Supports RabbitMQ style RPC\n\nUsing the `replyTo` header.\n\n    $ CONF=conf.json rabbiteer publish -e myservice -r somecall --rpc -f ./foo.json\n\nCalls `myservice/somecall` using the contents of file `foo.json` and sets up\na `replyTo` header and waits the the rpc reply. The reply will be printed\nto stdout.\n\n## Subscribe\n\nSubscribing binds an anonymous queue to an exchange and listens to\nmessages pushed to that exchange. The messages can either be dumped to\nstdout or as files to a directory.\n\n    $ rabbiteer subscribe --help\n    ...\n    FLAGS:\n        -i, --info       Include delivery info (and headers).\n    OPTIONS:\n        -e, --exchange \u003cexchange\u003e          Exchange to subscribe to\n        -o, --output \u003coutput\u003e              Output directory (- is stdout) [default: -]\n        -r, --routing-key \u003crouting_key\u003e    Routing key [default: #]\n\n\n### Example\n\n#### To stdout\n\nOutputs the body of each message to stdout. Makes no conversion\nof the body. If the body is binary, you will see gibberish in the\nterminal.\n\n\n    $ rabbiteer -u admin -p admin -v prod subscribe -e myexchange\n    ...\n\n\n##### With delivery info\n\n`-i` means we make a JSON wrapping of the message so we can include\nsome basic information about the delivery.\n\nThis always produces a JSON structure. When the body is binary (as\nindicated by `content_type`), the data is base64 encoded and when the\ntype is `text/...`, we output it as a JSON string.\n\nThe format is:\n\n```json\n{\n    \"deliver\":{\n        \"consumer_tag\":\"amq.ctag-Tjxx5Qy5zAr0o_yiLOsNEg\",\n        \"delivery_tag\":1,\n        \"redelivered\":false,\n        \"exchange\":\"myexchange\",\n        \"routing_key\":\"text\"\n    },\n    \"props\":{\n        \"content_type\":\"application/json\",\n        \"headers\":{\n            \"backendUpdate\":false,\n            \"batch\":false,\n            \"index\":\"dist-text\",\n            \"oper\":\"index\"\n        }\n    },\n    \"data\": \"body\"\n}\n```\n\n\n    $ rabbiteer -u admin -p admin -v prod subscribe -e myexchange -i\n    ...\n\n\n#### To a directory\n\nWith `-o` the body of each individual message is output to a separate\nfile. The header `fileName` can be supplied by the sender, in which case\nthat file is (over-)written.\n\n\n    $ rabbiteer -u admin -p admin -v prod subscribe -e myexchange -o /tmp\n    ...\n\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014-2016 rabbiteer devs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgesten%2Frabbiteer-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgesten%2Frabbiteer-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgesten%2Frabbiteer-rs/lists"}