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 | 4780580874e8d6a3e3590fa5fdf8a088310b20ae (patch) | |
| tree | a73e247b9821c2429a8e015ddff9cbb5d17a88e8 /qpid/cpp/src/tests/client_test.cpp | |
| parent | e29bb6406ad8d0c0d9d58b7d1d09798829687602 (diff) | |
| download | qpid-python-4780580874e8d6a3e3590fa5fdf8a088310b20ae.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@649915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/client_test.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/client_test.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/client_test.cpp b/qpid/cpp/src/tests/client_test.cpp index bd2a541c92..011dcd4678 100644 --- a/qpid/cpp/src/tests/client_test.cpp +++ b/qpid/cpp/src/tests/client_test.cpp @@ -33,12 +33,11 @@ #include "qpid/client/Message.h" #include "qpid/client/Session.h" #include "qpid/framing/FrameSet.h" -#include "qpid/framing/MessageTransferBody.h" +#include "qpid/framing/all_method_bodies.h" using namespace qpid; using namespace qpid::client; -using qpid::framing::FrameSet; -using qpid::framing::MessageTransferBody; +using namespace qpid::framing; using std::string; struct Args : public qpid::TestOptions { @@ -104,14 +103,14 @@ int main(int argc, char** argv) if (opts.trace) std::cout << "Declared queue." << std::endl; //now bind the queue to the exchange - session.queueBind(arg::exchange="MyExchange", arg::queue="MyQueue", arg::routingKey="MyKey"); + session.exchangeBind(arg::exchange="MyExchange", arg::queue="MyQueue", arg::bindingKey="MyKey"); if (opts.trace) std::cout << "Bound queue to exchange." << std::endl; //create and send a message to the exchange using the routing //key we bound our queue with: Message msgOut(generateData(opts.msgSize)); msgOut.getDeliveryProperties().setRoutingKey("MyKey"); - session.messageTransfer(arg::destination="MyExchange", arg::content=msgOut); + session.messageTransfer(arg::destination="MyExchange", arg::content=msgOut, arg::acceptMode=1); if (opts.trace) print("Published message: ", msgOut); //subscribe to the queue, add sufficient credit and then get @@ -132,6 +131,8 @@ int main(int argc, char** argv) } else { print("Received an unexepected message: ", msgIn); } + } else { + throw Exception("Unexpected command received"); } //close the session & connection |
