You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/11 19:21:20 UTC

[jira] [Commented] (QPID-7391) qpid-receive doesn't always honor the routing key from the reply-to address when replying

    [ https://issues.apache.org/jira/browse/QPID-7391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417787#comment-15417787 ] 

ASF GitHub Bot commented on QPID-7391:
--------------------------------------

GitHub user scholzj opened a pull request:

    https://github.com/apache/qpid-cpp/pull/2

    QPID-7391: fix the routing key / subject handling when responding to received messages in qpid-receive

    The proposed patch uses the routing key form the reply-to address as new subject, qpid.subject and x-amqp-0-10.routing-key. This makes sure that the response message will be actually sent according to the specified reply-to address.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/scholzj/qpid-cpp QPID-7391

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-cpp/pull/2.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2
    
----
commit 1da5598fa1b76ab10a8b1325710fc27ee8e2c672
Author: Jakub Scholz <ww...@scholzj.com>
Date:   2016-08-11T19:15:26Z

    Fix the routing key / subject handling when responsing to received messages

----


> qpid-receive doesn't always honor the routing key from the reply-to address when replying
> -----------------------------------------------------------------------------------------
>
>                 Key: QPID-7391
>                 URL: https://issues.apache.org/jira/browse/QPID-7391
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Jakub Scholz
>
> When qpid-receive receives a message which contains reply-to address it tries reply and send the received message back as a response. The reply-to address is used to create the sender and the original message is sent back over this sender. However, in case the original message already contains a different routing key / subject, it will stay with the message and override the routing key form the sender. As a result, the response message is sent with the routing key used for the original message not with the routing key from the reply-to address. See the following log as an example:
> {code}
> 2016-08-11 12:39:04 [Network] trace RECV [[[::1]:36138-localhost:5672]]: Frame[Bbe; channel=1; {MessageTransferBody: destination=request_be.ABCFR_ABCFRALMMACC1; accept-mode=0; acquire-mode=0; }]
> 2016-08-11 12:39:04 [Network] trace RECV [[[::1]:36138-localhost:5672]]: Frame[be; channel=1; header (192 bytes); properties={{MessageProperties: content-length=1024; reply-to={ReplyTo: exchange=response; routing-key=response.ABCFR_ABCFRALMMACC1.response_queue_1; }; content-type=text/plain; user-id=; application-headers={qpid.subject:V2:11:str16(someSubject),sn:F4:uint32(1),ts:F8:int64(1470933541265281533)}; }{DeliveryProperties: delivery-mode=2; exchange=request.ABCFR_ABCFRALMMACC1; routing-key=someSubject; }}]
> 2016-08-11 12:39:04 [Network] trace RECV [[[::1]:36138-localhost:5672]]: Frame[Ebe; channel=1; content (1024 bytes) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...]
> 2016-08-11 12:39:04 [Network] trace SENT [[[::1]:36138-localhost:5672]]: Frame[BEbe; channel=1; {SessionCompletedBody: commands={ }; timely-reply=1; }]
> 2016-08-11 12:39:04 [Client] debug Delivered {MessageTransferBody: destination=request_be.ABCFR_ABCFRALMMACC1; accept-mode=0; acquire-mode=0; } header (192 bytes); properties={{MessageProperties: content-length=1024; reply-to={ReplyTo: exchange=response; routing-key=response.ABCFR_ABCFRALMMACC1.response_queue_1; }; content-type=text/plain; user-id=; application-headers={qpid.subject:V2:11:str16(someSubject),sn:F4:uint32(1),ts:F8:int64(1470933541265281533)}; }{DeliveryProperties: delivery-mode=2; exchange=request.ABCFR_ABCFRALMMACC1; routing-key=someSubject; }}
> 2016-08-11 12:39:04 [Client] debug treating target address as topic: response/response.ABCFR_ABCFRALMMACC1.response_queue_1;{node:{type:topic}}
> 2016-08-11 12:39:04 [Network] trace SENT [[[::1]:36138-localhost:5672]]: Frame[BEbe; channel=1; {SessionCompletedBody: commands={ [0,0] }; }]
> 2016-08-11 12:39:04 [Network] trace SENT [[[::1]:36138-localhost:5672]]: Frame[BEbe; channel=1; {ExchangeDeclareBody: exchange=response; type=; alternate-exchange=; passive=1; arguments={}; }]
> 2016-08-11 12:39:04 [Network] trace RECV [[[::1]:36138-localhost:5672]]: Frame[BEbe; channel=1; {SessionKnownCompletedBody: commands={ }; }]
> 2016-08-11 12:39:04 [Network] trace RECV [[[::1]:36138-localhost:5672]]: Frame[BEbe; channel=1; {SessionCompletedBody: commands={ [0,7] }; }]
> 2016-08-11 12:39:04 [Client] debug Sending to exchange response {MessageProperties: content-length=1024; content-type=text/plain; user-id=; application-headers={qpid.subject:V2:11:str16(someSubject),sn:F4:uint32(1),ts:F8:int64(1470933541265281533),x-amqp-0-10.routing-key:V2:11:vbin16(someSubject)}; } {DeliveryProperties: delivery-mode=2; routing-key=someSubject; }
> 303	2851.59	2851.59	2851.59
> 2016-08-11 12:39:04 [Network] trace SENT [[[::1]:36138-localhost:5672]]: Frame[Bbe; channel=1; {MessageTransferBody: destination=response; accept-mode=1; acquire-mode=0; }]
> 2016-08-11 12:39:04 [Network] trace SENT [[[::1]:36138-localhost:5672]]: Frame[be; channel=1; header (170 bytes); properties={{MessageProperties: content-length=1024; content-type=text/plain; user-id=; application-headers={qpid.subject:V2:11:str16(someSubject),sn:F4:uint32(1),ts:F8:int64(1470933541265281533),x-amqp-0-10.routing-key:V2:11:vbin16(someSubject)}; }{DeliveryProperties: delivery-mode=2; routing-key=someSubject; }}]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org