【问题标题】:Qpid Proton CPP issue with exchangesQpid Proton CPP 与交易所的问题
【发布时间】:2016-05-19 18:33:00
【问题描述】:

我对 Qpid Proton 中最微不足道的步骤有疑问。这是我的设置

 qpid-config -a localhost:5672 add exchange test.announce
 qpid-config -a localhost:5672 add queue test.announce.q
 qpid-config -a localhost:5672 bind test.announce test.announce.q

(没有特意指定路由键) 当我使用以下内容运行质子 cpp 服务器和客户端时

 ./server -a amqp://127.0.0.1:5672/test.announce
 ./client -a amqp://127.0.0.1:5672/test.announce.q

客户端无法与服务器通信。但是使用独立的 qpid 工具

qpid-receive -a test.announce.q -b 127.0.0.1:5672  -t -f
echo "hello world!!!"|qpid-send -b 127.0.0.1:5672 -a test.announce -m 1 --content-stdin

这按预期工作。 对 Proton 服务器运行 qpid-send 似乎也可以正常工作。我在 Proton 消息 API 中看不到任何可以更新的内容,也不确定我在这里缺少什么。服务器和客户端代码与 0.12 快照中的代码几乎相同。有什么想法吗?

【问题讨论】:

    标签: c++ qpid


    【解决方案1】:

    我意识到我的错误。 AMQP 中服务器和客户端的概念似乎有些颠倒。我更改了应用程序,以便客户端在交换中“发送”,而服务器在队列上侦听并且一切正常。

     ./server -a amqp://127.0.0.1:5672/test.announce.q
     ./client -a amqp://127.0.0.1:5672/test.announce
    

    【讨论】:

      猜你喜欢
      • 2015-03-04
      • 2018-07-12
      • 2016-08-06
      • 2017-10-17
      • 2016-01-13
      • 2014-09-07
      • 1970-01-01
      • 2018-01-12
      • 2016-03-31
      相关资源
      最近更新 更多