首页 > 解决方案 > Change qpid Protocol version number using c++ api

问题描述

While running through the qpid c++ api tutorial I ran into "Session ended by peer with amqp:internal-error" which i assume is because of different versions of the qpid api and my broker (Rabbitmq).

I have changed the rabbitmq to use protocol 1.0, but it looks like qpid defaults to 0-10. I have found a bunch of articles saying I should move up to version 1.0 of the api, but I have not been able to find out how. Does anyone know how to do this?

标签: c++rabbitmqamqpqpid

解决方案


找出解决方案,创建连接时,您可以在那里设置协议,但我认为您可能还需要安装 qpid-proton。

Connection connection("rabbitmq-serv:5672","{protocol: 'amqp1.0'}");

它仍然失败,但 rabbitmq 似乎承认它的存在

另外qpid-proton好像连接rabbitmq没问题,默认使用amqp1.0


推荐阅读