How to read reply_to from message in library for rabbitmq - amqpcpp?

455 views Asked by At

I'm trying to read reply_to param from message with no success. I'm using rabbitcpp C++ library for Message Queue Server RabbitMQ https://github.com/akalend/amqpcpp

        AMQPQueue * qu2 = amqp.createQueue();
        qu2->Declare("test", AMQP_DURABLE);
        qu2->Get(AMQP_NOACK);
        AMQPMessage * m = qu2->getMessage();
        if (m->getMessageCount() > -1) {
            uint32_t j = 0;
            std::string response = m->getMessage(&j);
            std::string replyTo = m->getHeader("reply_to");
        }

And m->getHeader("reply_to") is empty.

enter image description here

1

There are 1 answers

0
Андрей Козлов On BEST ANSWER

You should use the parameter with a capital letter "Reply-to", additional information about headers you can find in AMQPExchange.cpp.