[
https://issues.apache.org/jira/browse/QPID-7391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417852#comment-15417852
]
ASF subversion and git services commented on QPID-7391:
-------------------------------------------------------
Commit ef7c46ad4f59e828493f94a3a4bc068a27c1ff11 in qpid-cpp's branch
refs/heads/master from [~scholzj]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;h=ef7c46a ]
QPID-7391: Fix the routing key / subject handling when responsing to received
messages
This closes #2.
> 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: [email protected]
For additional commands, e-mail: [email protected]