On 02/18/2015 08:11 AM, Michael Ivanov wrote:
Sorry I still cannot get the reply working :-(

I do the following:

    _sender messenger is created.
    I create a subscription to "amqp://127.0.0.1/#" for this messenger and
    keep the reply address queue:

        s = pn_messenger_subscribe(_sender, "amqp://127.0.0.1/#"));
       _reply_addr = pn_subscription_address(s);

    At this moment I check the qpidd state with qpid-stat -q and verify
    that temporary queue is created.

    At some later tome I prepare the message and set a reply address to is
    as follows:

       pn_message_set_reply_to(message, _reply_addr);

    I verify again with qpid-stat -q, reply queue is still there.

    Now I assign the target address to message and send it:

       pn_messenger_set_timeout(_sender, timeout);
       pn_messenger_put(_sender, msg);
       pn_messenger_send(_sender, -1);

    Immediately before pn_messenger_set_timeout I print the value of
    pn_message_get_reply_to() and it is correct.

    After messenger send I check again with qpid-stat -q and I see that
    the reply queue is gone! Btw, the message is received and executed
    by broker correctly (the actual message is queue create request
    directed to qmf.default.direct, the queue is created properly).

    When I run pn_messenger_recv(_sender, 1) I get an error:

       CONNECTION ERROR (amqp:internal-error) not-found: Exchange not found: \
          amqp: 
(/Archive/misc/mq/qpid-cpp-0.30/src/qpid/broker/ExchangeRegistry.cpp:144)
       18-Feb-2015 10:49:45.677 @E Error reading messages: no valid sources

That is an error coming back from the broker and is caused by having amqp://127.0.0.1/ prefixed to the address, which the broker doesn't recognise.

Can you set the env var PN_TRACE_FRM=1 before running to capture the protocol trace? That would help see where exactly the address is being used in this form over the wire. It may be that the reply-to address needs to have the prefix trimmed off first.


    I guess this is because the reply queue has somehow dissappeared.

What's wrong here?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to