2

我开始学习 AMQP 和 RabbitMQ。

为了让自己继续前进,我使用了 CLI 工具 rabbitmqadmin,成功地将数据发布到了我在 Mac OS X 机器上创建的 RabbitMQ 开发安装。到目前为止一切顺利,我可以发布消息,并观看它们出列......

但是,当我在 Heroku / CloudAMQP 实例上尝试完全相同的功能时,rabbitmqadmin 客户端似乎崩溃了。

这是电话:

rabbitmqadmin --host lemur.cloudamqp.com --vhost app4444444_heroku.com --user app4444444_heroku.com --password <withheld> publish routing_key=test payload="hello"

...这是输出:

Traceback (most recent call last):
  File "/usr/local/bin/rabbitmqadmin", line 828, in <module>
    main()
  File "/usr/local/bin/rabbitmqadmin", line 325, in main
    method()
  File "/usr/local/bin/rabbitmqadmin", line 428, in invoke_get
    result = self.post(uri, json.dumps(upload))
  File "/usr/local/bin/rabbitmqadmin", line 354, in post
    return self.http("POST", path, body)
  File "/usr/local/bin/rabbitmqadmin", line 377, in http
    resp = conn.getresponse()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1013, in getresponse
    response.begin()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 402, in begin
    version, status, reason = self._read_status()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 366, in _read_status
    raise BadStatusLine(line)
httplib.BadStatusLine: ''

感谢您收到任何想法或想法!

4

1 回答 1

3

添加--ssl到命令行。CloudAMQP 的 web ui 仅支持 https。

于 2012-06-21T12:14:32.943 回答