跳转到主要内容

用于向RabbitMQ发布消息的命令行工具

项目描述

一个小型命令行工具,遵循Unix哲学,用于向RabbitMQ发布消息。

rabbitstewstdin 获取输入,并为每行接收到的消息发布一条消息。您可以自定义使用的交换和路由键,以及消息属性。此外,如果您需要,可以启用发布者确认。

Version Downloads Status License

安装

兔子炖菜可在Python包索引中找到,并且可以通过pipeasy_install进行安装。

用法示例

cat /var/log/messages | rabbitstew -H rabbit-server -r syslog.messages

CLI选项

usage: rabbitstew [-h] [-H HOST] [-p PORT] [-s] [-v VHOST] [-u USER]
                  [-P PASSWORD] [-W] [-e EXCHANGE] [-r ROUTING_KEY] [-c]
                  [--add-user] [--app-id APP_ID] [--auto-id]
                  [--content-type VALUE] [--type TYPE] [-V] [--version]

RabbitMQ message publisher

optional arguments:
  -h, --help            show this help message and exit
  -H HOST               Server hostname (default: localhost)
  -p PORT               Server port (default: 5672)
  -s                    Use SSL to connect (default: False)
  -v VHOST              Server virtual host (default: /)
  -u USER               Server username (default: guest)
  -P PASSWORD           Server password (default: guest)
  -W                    Prompt for password (default: False)
  -f PATH               Read password from a file (default: None)
  -e EXCHANGE           Exchange to publish to (default: None)
  -r ROUTING_KEY        Routing Key to use (default: None)
  -c                    Confirm delivery of each message, exiting if a message
                        delivery could not be confirmed (default: False)
  --add-user            Include the user in the message properties (default: False)
  --app-id APP_ID       Specify the app-id property of the message (default: rabbitstew)
  --auto-id             Create a unique message ID for each message (default: False)
  --content-type VALUE  Specify the content type of the message (default: None)
  --type TYPE           Specify the message type (default: None)
  -V                    Verbose output (default: False)
  --version             show program's version number and exit

版本历史

  • 0.1.0 - 发布于 2015-02-02
    • 初始发布

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面