【发布时间】:2014-06-27 03:03:57
【问题描述】:
我正在尝试使用 pythons stompclient 向 activemq 发送消息。 https://bitbucket.org/hozn/stompclient/wiki/User%20Documentation 如果有更好的图书馆,我愿意接受建议。 如果我更改为 ip 或端口,它将无法连接,所以我假设连接正常。运行此代码时没有错误,只是我在队列中看不到任何消息。我认为目标路径可能是它失败的地方 activemq 队列的 PhysicalName 是这种模式'abc.queue_name'。 我已经尝试了以下目的地
/queue/abc/queue_name
/queue/abc.queue_name
abc.queue_name
非常感谢任何建议。 谢谢
from stompclient import PublishClient
client = PublishClient('IP', 53680)
response = client.connect('defaultPassword', 'defaultUser')
reponse1 = client.send('/queue/abc/queue_name', 'bla')
time.sleep(5)
【问题讨论】:
-
您在运行此代码时是否遇到任何错误?
标签: python-2.7 activemq stomp