0

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

mrgrechkinn
  • 883
  • 8
  • 19
  • Pls add more info on queue name , code that u use to send the message to queue and other debug info like , have u seen the message on rabbitmq console , have u tried ngrep and see if message actually exchanged ... – Sanjay Sep 20 '18 at 17:09

1 Answers1

1

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