diff options
author | Gordon Sim <gsim@apache.org> | 2010-02-02 11:09:11 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2010-02-02 11:09:11 +0000 |
commit | 4840fe938fd73412ad9393569b37b5a7416c1b51 (patch) | |
tree | bd27062f285bccab69d33b87b4aea801a730c065 /cpp/src/tests/qpid_send.cpp | |
parent | a57db5a5472a1aec570ddf3269e9d07c59fcf5a0 (diff) | |
download | qpid-python-4840fe938fd73412ad9393569b37b5a7416c1b51.tar.gz |
QPID-2380: recognise reliability option for sender (also added capacity to qpid_send test client and fixed handling of empty option string)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@905579 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/qpid_send.cpp')
-rw-r--r-- | cpp/src/tests/qpid_send.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/tests/qpid_send.cpp b/cpp/src/tests/qpid_send.cpp index 9556fb000f..57c348ab9c 100644 --- a/cpp/src/tests/qpid_send.cpp +++ b/cpp/src/tests/qpid_send.cpp @@ -63,6 +63,7 @@ struct Options : public qpid::Options std::string content; uint tx; uint rollbackFrequency; + uint capacity; qpid::log::Options log; Options(const std::string& argv0=std::string()) @@ -76,6 +77,7 @@ struct Options : public qpid::Options ttl(0), tx(0), rollbackFrequency(0), + capacity(0), log(argv0) { addOptions() @@ -94,6 +96,7 @@ struct Options : public qpid::Options ("correlation-id", qpid::optValue(correlationid, "ID"), "correlation-id for message") ("user-id", qpid::optValue(userid, "USERID"), "userid for message") ("content", qpid::optValue(content, "CONTENT"), "specify textual content") + ("capacity", qpid::optValue(capacity, "N"), "size of the senders outgoing message queue") ("tx", qpid::optValue(tx, "N"), "batch size for transactions (0 implies transaction are not used)") ("rollback-frequency", qpid::optValue(rollbackFrequency, "N"), "rollback frequency (0 implies no transaction will be rolledback)") ("help", qpid::optValue(help), "print this usage statement"); @@ -184,6 +187,7 @@ int main(int argc, char ** argv) connection.open(opts.url); Session session = connection.newSession(opts.tx > 0); Sender sender = session.createSender(opts.address); + if (opts.capacity) sender.setCapacity(opts.capacity); Message msg; msg.setDurable(opts.durable); if (opts.ttl) { |