From 4840fe938fd73412ad9393569b37b5a7416c1b51 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 2 Feb 2010 11:09:11 +0000 Subject: 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 --- cpp/src/tests/qpid_send.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/src/tests/qpid_send.cpp') 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) { -- cgit v1.2.1