我正在使用qpid broker(0.28)和qpid JMS客户端与代理进行通信。我想使用amqp1.0协议,当我尝试example given here时,使用连接URL作为amqp://guest:guest@localhost:5672?clientid=test
,我收到错误,因为它无法连接到qpid主机
Caught exception: Unknown hostname localhostjavax.jms.JMSException: Unknown hostname localhost at org.apache.qpid.amqp_1_0.jms.impl.SessionImpl.(SessionImpl.java:97) at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:231) at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:210) at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:40)
当我将连接网址更改为amqp://guest:guest@localhost:5672?clientid=test&remote-host=default
时,我收到错误
Caused by: org.apache.qpid.amqp_1_0.client.Sender$SenderCreationException: Peer did not create remote endpoint for link, target: ping at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:185) at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:113) at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:106) at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:92) at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:78) at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:72) at org.apache.qpid.amqp_1_0.client.Session$1.(Session.java:90) at org.apache.qpid.amqp_1_0.client.Session.createSender(Session.java:89)
有人可以帮助理解究竟发生了什么吗?我做错了什么?