Search code examples
c++rabbitmqamqpqpid

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?


Solution

  • Figured out the solution, when creating connection you can set protocol there, though i think you may need qpid-proton installed as well.

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

    It still gets failures, but rabbitmq seems to acknowledge that it exists

    Also qpid-proton seems to connect to rabbitmq no problem, using the amqp1.0 by default