Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ABD2B17F9B for ; Wed, 18 Feb 2015 11:20:23 +0000 (UTC) Received: (qmail 32918 invoked by uid 500); 18 Feb 2015 11:19:44 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 32881 invoked by uid 500); 18 Feb 2015 11:19:44 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 32870 invoked by uid 99); 18 Feb 2015 11:19:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2015 11:19:44 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gsim@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2015 11:19:17 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1IBHCJc013434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 18 Feb 2015 06:17:12 -0500 Received: from [10.36.116.90] (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1IBHAPC006694 for ; Wed, 18 Feb 2015 06:17:11 -0500 Message-ID: <54E4751A.5000902@redhat.com> Date: Wed, 18 Feb 2015 11:18:50 +0000 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Matt Parsons (USA), Charlie Peters (USA), Michael O'Neill (Ireland) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: proton reply handling again References: <54CF4777.4030104@logit-ag.de> <54E44924.7060901@isle.spb.ru> <54E45D54.4040306@redhat.com> <54E47195.60807@logit-ag.de> In-Reply-To: <54E47195.60807@logit-ag.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Virus-Checked: Checked by ClamAV on apache.org On 02/18/2015 11:03 AM, Michael Ivanov wrote: > Ok I have run my test program with PN_TRACE_FRM set to 1. The program sends a request > to qpidd to create a queue TESTQUEUE. As can be seen the queue is actually created but > temporary reply queue has dissappeared right after send operation. > > The output is as follows: > > 18-Feb-2015 13:53:45.973 @D ######################## EVENTLOOP RUN ######################## >>> A TESTQUEUE > [0x177f450]: -> SASL > [0x177f450]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS, initial-response=b""] > [0x177f450]: <- SASL > [0x177f450]:0 <- @sasl-mechanisms(64) [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]] > [0x177f450]:0 <- @sasl-outcome(68) [code=0] > [0x177f450]: <- AMQP > [0x177f450]: -> AMQP > [0x177f450]:0 -> @open(16) [container-id="2a4b9ebb-a82c-4f01-9ede-a0259d1f134b", hostname="127.0.0.1"] > [0x177f450]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=0] > [0x177f450]:0 -> @attach(18) [name="receiver-xxx", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) > [durable=0, timeout=0, dynamic=true], target=@target(41) [durable=0, timeout=0, dynamic=false], initial-delivery-count=0] > [0x177f450]:0 <- @open(16) [container-id="9d6de7ab-a0ac-43fb-aee4-e43ec4701ef5"] > [0x177f450]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=0, incoming-window=2147483647, outgoing-window=0] > [0x177f450]:0 <- @attach(18) [name="receiver-xxx", handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, > source=@source(40) [address="2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxx", durable=0, timeout=0, dynamic=false], > target=@target(41) [durable=0, timeout=0, dynamic=false], initial-delivery-count=0] > > 18-Feb-2015 13:54:07.826 @D SUBSCRIPTION ADDRESS: [amqp://127.0.0.1:5672/2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxx] > Queues > queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind > ================================================================================================================================== > 2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxx Y 0 0 0 0 0 0 1 1 > 773cc3a0-4c56-456c-9fb2-4b1b7fafa319:0.0 Y Y 0 0 0 0 0 0 1 2 > > 18-Feb-2015 13:54:07.885 @D SUBSCRIBED TO: [amqp://127.0.0.1:5672/2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxx] > Queues > queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind > ================================================================================================================================== > 06d21658-efe5-4eca-8044-2bacf54ec5b5:0.0 Y Y 0 0 0 0 0 0 1 2 > 2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxx Y 0 0 0 0 0 0 1 1 > > 18-Feb-2015 13:54:07.940 @D SEND message to [amqp://127.0.0.1:5672/qmf.default.direct], reply to > [amqp://127.0.0.1:5672/2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxx]: > 18-Feb-2015 13:54:07.940 @D PROPERTIES: {"method"="request", "qmf.opcode"="_method_request", "x-amqp-0-10.app-id"="qmf2"} > 18-Feb-2015 13:54:07.940 @D DATA: {"_object_id"={"_object_name"="org.apache.qpid.broker:broker:amqp-broker"}, > "_method_name"="create", "_arguments"={"type"="queue", "name"="TESTQUEUE", "properties"={"durable"=true}, "strict"=true}} > [0x177f450]:1 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=1] > [0x177f450]:1 -> @attach(18) [name="sender-xxx", handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) > [address="qmf.default.direct", durable=0, timeout=0, dynamic=false], target=@target(41) [address="qmf.default.direct", > durable=0, timeout=0, dynamic=false], initial-delivery-count=0] > [0x177f450]:1 <- @begin(17) [remote-channel=1, next-outgoing-id=0, incoming-window=2147483647, outgoing-window=0] > [0x177f450]:1 <- @attach(18) [name="sender-xxx", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) > [durable=0, timeout=0, dynamic=false], target=@target(41) [address="qmf.default.direct", durable=0, timeout=0, dynamic=false], > initial-delivery-count=0] > [0x177f450]:1 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, next-outgoing-id=0, outgoing-window=0, handle=0, > delivery-count=0, link-credit=100, drain=false] > [0x177f450]:1 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"\x00\x00\x00\x00\x00\x00\x00\x00", message-format=0, > settled=true, more=false] (472) > "\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00\x9e\x00\x00\x00\x0d@@\xa1(amqp://127.0.0.1:5672/qmf.default.direct\xa1\x06broker\xa1Gamqp://127.0.0.1:5672/2a4b9ebb-a82c-4f01-9ede-a0259d1f134b_receiver-xxxq\x00\x00\x00\x01@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00L\x00\x00\x00\x06\xa1\x06method\xa1\x07request\xa1\x0aqmf.opcode\xa1\x0f_method_request\xa1\x12x-amqp-0-10.app-id\xa1\x04qmf2\x00Sw\xd1\x00\x00\x00\xc3\x00\x00\x00\x06\xa1\x0a_object_id\xd1\x00\x00\x00=\x00\x00\x00\x02\xa1\x0c_object_name\xa1)org.apache.qpid.broker:broker:amqp-broker\xa1\x0c_method_name\xa1\x06create\xa1\x0a_arguments\xd1\x00\x00\x00J\x00\x00\x00\x08\xa1\x04type\xa1\x05queue\xa1\x04name\xa1\x09TESTQUEUE\xa1\x0aproperties\xd1\x00\x00\x00\x0e\x00\x00\x00\x02\xa1\x07durableA\xa1\x06strictA" The problem is that the reply-to is set to be the full url. It need to only be the 'path' portion of that. (You could use proton/url.h to separate out the path) The broker is trying to reply to the address given, but failing to do so and closing the connection as a result. Which means the associated temp queue goes away also. > > 18-Feb-2015 13:54:07.940 @D REQUEST SENT > Queues > queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind > ========================================================================================================================= > 302effc8-e870-46db-a37c-13dfd4b8d108:0.0 Y Y 0 0 0 0 0 0 1 2 > TESTQUEUE Y 0 0 0 0 0 0 0 1 > > [0x177f450]:0 -> @flow(19) [next-incoming-id=0, incoming-window=2147483647, next-outgoing-id=0, outgoing-window=0, handle=0, > delivery-count=0, link-credit=1, drain=false] > [0x177f450]:0 <- @close(24) [error=@error(29) [condition=:"amqp:internal-error", description="not-found: Exchange not found: > amqp: (/Archive/misc/mq/qpid-cpp-0.30/src/qpid/broker/ExchangeRegistry.cpp:144)"]] > [0x177f450]: <- EOS > CONNECTION ERROR (amqp:internal-error) not-found: Exchange not found: amqp: > (/Archive/misc/mq/qpid-cpp-0.30/src/qpid/broker/ExchangeRegistry.cpp:144) > [0x177f450]:0 -> @close(24) [] > [0x177f450]: -> EOS > [0x177f450]: -> EOS > [0x177f450]: -> EOS > 18-Feb-2015 13:54:07.995 @E Error reading messages: no valid sources > > Best regards, > > 18.02.2015 12:37, Gordon Sim пишет: >> 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-unsubscribe@qpid.apache.org >> For additional commands, e-mail: users-help@qpid.apache.org >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org