diff options
author | Gordon Sim <gsim@apache.org> | 2008-04-20 12:10:37 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-04-20 12:10:37 +0000 |
commit | 0637677cf6653256b67c82dcb74f35133601220c (patch) | |
tree | 8507bb8373e8b6dfd8c9b96fcb4b262fd4d61501 /cpp/src/tests/txtest.cpp | |
parent | 48dab065ef526f68a5a7d4c4ba22c5b8b2e2e026 (diff) | |
download | qpid-python-0637677cf6653256b67c82dcb74f35133601220c.tar.gz |
QPID-920: converted c++ client to use final 0-10 protocol
* connection handler converted to using invoker & proxy and updated to final method defs
* SessionCore & ExecutionHandler replace by SessionImpl
* simplified handling of completion & results, removed handling of responses
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/txtest.cpp')
-rw-r--r-- | cpp/src/tests/txtest.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpp/src/tests/txtest.cpp b/cpp/src/tests/txtest.cpp index 4c5814986c..5030b24070 100644 --- a/cpp/src/tests/txtest.cpp +++ b/cpp/src/tests/txtest.cpp @@ -142,7 +142,7 @@ struct Transfer : public Client, public Runnable out.setData(in.getData()); out.getMessageProperties().setCorrelationId(in.getMessageProperties().getCorrelationId()); out.getDeliveryProperties().setDeliveryMode(in.getDeliveryProperties().getDeliveryMode()); - session.messageTransfer(arg::content=out); + session.messageTransfer(arg::content=out, arg::acceptMode=1); } in.acknowledge(); session.txCommit(); @@ -168,7 +168,8 @@ struct Controller : public Client { //declare queues for (StringSet::iterator i = queues.begin(); i != queues.end(); i++) { - session.queueDeclare(arg::queue=*i, arg::durable=opts.durable).sync(); + session.queueDeclare(arg::queue=*i, arg::durable=opts.durable); + session.sync(); } Message msg(generateData(opts.size), *queues.begin()); @@ -179,7 +180,7 @@ struct Controller : public Client //publish messages for (StringSet::iterator i = ids.begin(); i != ids.end(); i++) { msg.getMessageProperties().setCorrelationId(*i); - session.messageTransfer(arg::content=msg); + session.messageTransfer(arg::content=msg, arg::acceptMode=1); } } @@ -205,7 +206,7 @@ struct Controller : public Client { SubscriptionManager subs(session); subs.setFlowControl(SubscriptionManager::UNLIMITED, SubscriptionManager::UNLIMITED, false); - subs.setConfirmMode(false); + subs.setAcceptMode(1/*not-required*/); StringSet drained; //drain each queue and verify the correct set of messages are available @@ -213,7 +214,8 @@ struct Controller : public Client //subscribe, allocate credit and flush LocalQueue lq(AckPolicy(0));//manual acking subs.subscribe(lq, *i, *i); - session.messageFlush(arg::destination=*i).sync(); + session.messageFlush(arg::destination=*i); + session.sync(); uint count(0); while (!lq.empty()) { |