diff options
author | Gordon Sim <gsim@apache.org> | 2013-08-30 12:31:45 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2013-08-30 12:31:45 +0000 |
commit | 72f706cac68f5e7146ca5facb0e72e9d35b4332b (patch) | |
tree | 5e06aa2fbc333e958df734c8d3278ee196696957 /qpid/cpp/src/tests/qpid-receive.cpp | |
parent | d256497d38f297019eaee1d4713d2c621aa71a6b (diff) | |
download | qpid-python-72f706cac68f5e7146ca5facb0e72e9d35b4332b.tar.gz |
QPID-5040: fix for string and symbol types on AmqpValue section (also clear message on fetch())
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1518955 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-receive.cpp')
-rw-r--r-- | qpid/cpp/src/tests/qpid-receive.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/qpid-receive.cpp b/qpid/cpp/src/tests/qpid-receive.cpp index d00b828ddc..1849e11667 100644 --- a/qpid/cpp/src/tests/qpid-receive.cpp +++ b/qpid/cpp/src/tests/qpid-receive.cpp @@ -69,6 +69,7 @@ struct Options : public qpid::Options string readyAddress; uint receiveRate; std::string replyto; + bool noReplies; Options(const std::string& argv0=std::string()) : qpid::Options("Options"), @@ -91,7 +92,8 @@ struct Options : public qpid::Options reportTotal(false), reportEvery(0), reportHeader(true), - receiveRate(0) + receiveRate(0), + noReplies(false) { addOptions() ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to") @@ -116,6 +118,7 @@ struct Options : public qpid::Options ("ready-address", qpid::optValue(readyAddress, "ADDRESS"), "send a message to this address when ready to receive") ("receive-rate", qpid::optValue(receiveRate,"N"), "Receive at rate of N messages/second. 0 means receive as fast as possible.") ("reply-to", qpid::optValue(replyto, "REPLY-TO"), "specify reply-to address on response messages") + ("ignore-reply-to", qpid::optValue(noReplies), "Do not send replies even if reply-to is set") ("help", qpid::optValue(help), "print this usage statement"); add(log); } @@ -248,7 +251,7 @@ int main(int argc, char ** argv) } else if (opts.ackFrequency && (count % opts.ackFrequency == 0)) { session.acknowledge(); } - if (msg.getReplyTo()) { // Echo message back to reply-to address. + if (msg.getReplyTo() && !opts.noReplies) { // Echo message back to reply-to address. Sender& s = replyTo[msg.getReplyTo().str()]; if (s.isNull()) { s = session.createSender(msg.getReplyTo()); @@ -263,8 +266,6 @@ int main(int argc, char ** argv) int64_t delay = qpid::sys::Duration(qpid::sys::now(), waitTill); if (delay > 0) qpid::sys::usleep(delay/qpid::sys::TIME_USEC); } - // Clear out message properties & content for next iteration. - msg = Message(); // TODO aconway 2010-12-01: should be done by fetch } if (opts.reportTotal) reporter.report(); if (opts.tx) { |