qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject qpid-cpp git commit: QPID-7391: Fix the routing key / subject handling when responsing to received messages
Date Thu, 11 Aug 2016 20:09:03 GMT
Repository: qpid-cpp
Updated Branches:
  refs/heads/master 7bb2d289a -> ef7c46ad4


QPID-7391: Fix the routing key / subject handling when responsing to received messages

This closes #2.


Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/ef7c46ad
Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/ef7c46ad
Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/ef7c46ad

Branch: refs/heads/master
Commit: ef7c46ad4f59e828493f94a3a4bc068a27c1ff11
Parents: 7bb2d28
Author: Jakub Scholz <www@scholzj.com>
Authored: Thu Aug 11 15:15:26 2016 -0400
Committer: Gordon Sim <gsim@redhat.com>
Committed: Thu Aug 11 21:07:47 2016 +0100

----------------------------------------------------------------------
 src/tests/qpid-receive.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/ef7c46ad/src/tests/qpid-receive.cpp
----------------------------------------------------------------------
diff --git a/src/tests/qpid-receive.cpp b/src/tests/qpid-receive.cpp
index eeb425f..d19337d 100644
--- a/src/tests/qpid-receive.cpp
+++ b/src/tests/qpid-receive.cpp
@@ -267,6 +267,15 @@ int main(int argc, char ** argv)
                         s.setCapacity(opts.capacity);
                         replyTo[msg.getReplyTo().str()] = s;
                     }
+                    if (!msg.getSubject().empty()) {
+                        msg.setSubject(msg.getReplyTo().getSubject());
+                        if (msg.getProperties().count("qpid.subject") == 1) {
+                            msg.setProperty("qpid.subject", msg.getReplyTo().getSubject());
+                        }
+                        if (msg.getProperties().count("x-amqp-0-10.routing-key") == 1) {
+                            msg.setProperty("x-amqp-0-10.routing-key", msg.getReplyTo().getSubject());
+                        }
+                    }
                     msg.setReplyTo(Address(opts.replyto));
                     s.send(msg);
                 }


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


Mime
View raw message