Iam嘗試使用pythons stompclient向activemq發送消息。 https://bitbucket.org/hozn/stompclient/wiki/User%20Documentation 如果有一個更好的圖書館,這個我打開建議。 如果我更改爲IP或端口它將無法連接,所以即時通訊假設連接正在工作。當我運行這段代碼時,沒有任何錯誤,只是我看不到隊列中的消息。我認爲目標路徑可能在失敗的地方,activemq隊列的PhysicalName在這種模式'abc.queue_name'中。 我試過以下目的地無法用stompclient發送消息
/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)
當您運行此代碼時,您是否收到任何錯誤? – Buchi