【发布时间】:2018-09-25 09:10:20
【问题描述】:
我有以下问题: 我需要测试与 AMQ 协议 上运行的 RabbitMQ 服务器 的连接,并且我需要使用 CMD 或类似的东西来完成它,所以我可以从脚本执行命令。我不知道这是否可能,我在互联网上发现的唯一东西是通过 HTTP 测试连接,它对我不起作用。所以很快,我需要 cmd 命令来测试与使用的 RabbitMQ 服务器的连接AMQP。
我希望有人明白我的问题是什么,也许我描述得不好。
提前致谢。
【问题讨论】:
-
你从github.com/mariuszwojcik/RabbitMQTools看过
Get-RabbitMQConnection吗?运行 cmd.exe cam 的现代机器也有(可能已经有)powershell.exe。 -
您在这里提供的帖子实际上取得了一点进展,因为我不知道这个存储库,但这仍然不是我的问题的真正解决方案。
-
在 cmd.exe shell 中,命令
powershell -NoProfile -Command "Get-RabbitMQConnection ..."是否会识别 RabbitMQ 是否正常工作? -
在尝试执行您在此处提供的命令后,我收到此错误
Get-RabbitMQConnection : The term 'Get-RabbitMQConnection' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + Get-RabbitMQConnection + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-RabbitMQConnection:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException -
你安装了
RabbitMQTools吗?请参阅该页面上的Getting Started部分。