在 Debian 8 上启动 amqp-consume

Starting amqp-consume on Debian 8

我曾经在 debian 7 中使用下面的命令使用来自 amqp-consume 的消息,但我安装了 debian 8 我认为 amqp-tools 不同,它无法识别我的命令。

我注意到了一些变化。我的 Web 界面将端口从 55672 更改为 15672。

amqp-consume -d -q queue.udrive.admin.uiscsi -s 10.0.1.251 -p 5672 -e "directExchangeUdrive" --vhost "/" -r "" --username=guest --password=guest /bin/bash remoteManageUiSCSI.sh
error: both --server and --url options specify server host

我认为命令需要它:

amqp-consume 
consuming command not specified
Usage: amqp-consume [-dxA?] [-u|--url=amqp://...] [-s|--server=hostname] [--port=port] [--vhost=vhost] [--username=username] [--password=password] [--ssl] [--cacert=cacert.pem] [--key=key.pem] [--cert=cert.pem] [-q|--queue=queue] [-e|--exchange=exchange] [-r|--routing-key=routing key] [-d|--declare] [-x|--exclusive] [-A|--no-ack] [-c|--count=limit] [-p|--prefetch-count=limit] [-?|--help] [--usage] [OPTIONS]... <command> <args>

我在 amqp:// 上尝试了各种方法,但都没有用。

我在其他站点得到了答案 https://qpid.apache.org/releases/qpid-0.30/programming/book/QpidJNDI.html 但我仍然想知道为什么这个答案不在 "man amqp-consume" 或 rabbitmq 网站....

适用于我的命令是:

amqp-consume -d -u amqp://test:test@ustorageprod/%2f -q queue.udrive.admin.uiscsi -e "directExchangeUdrive" -r "" /bin/bash remoteManageUiSCSI.sh

amqp-publish -u amqp://test:test@ustorageprod/%2f -r "queue.udrive.ustorage" -e "directExchangeUdrive" -b "$msg"