diff options
| author | Gordon Sim <gsim@apache.org> | 2010-03-31 16:17:17 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2010-03-31 16:17:17 +0000 |
| commit | e148043f68f2f71b057d191177dcdf83156f642a (patch) | |
| tree | 4d72df191ac33404bf198ef18608142505d48b4b /qpid/cpp/examples/messaging/drain.cpp | |
| parent | c2862944f94bdae8d467980da5946e8e7b6fa2e1 (diff) | |
| download | qpid-python-e148043f68f2f71b057d191177dcdf83156f642a.tar.gz | |
QPID-664: made changes suggested by Alan Conway, also moved 0-10 map/list codecs to common lib
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@929606 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples/messaging/drain.cpp')
| -rw-r--r-- | qpid/cpp/examples/messaging/drain.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/examples/messaging/drain.cpp b/qpid/cpp/examples/messaging/drain.cpp index a2fa0f1138..1215ac75d2 100644 --- a/qpid/cpp/examples/messaging/drain.cpp +++ b/qpid/cpp/examples/messaging/drain.cpp @@ -20,7 +20,6 @@ */ #include <qpid/messaging/Connection.h> -#include <qpid/messaging/MapView.h> #include <qpid/messaging/Message.h> #include <qpid/messaging/Receiver.h> #include <qpid/messaging/Session.h> @@ -97,14 +96,16 @@ int main(int argc, char** argv) Connection connection(options.connectionOptions); try { connection.open(options.url); - Session session = connection.newSession(); + Session session = connection.createSession(); Receiver receiver = session.createReceiver(options.address); Duration timeout = options.getTimeout(); Message message; while (receiver.fetch(message, timeout)) { std::cout << "Message(properties=" << message.getProperties() << ", content='" ; if (message.getContentType() == "amqp/map") { - std::cout << MapView(message); + Variant::Map map; + decode(message, map); + std::cout << map; } else { std::cout << message.getContent(); } |
