From 144f3c698bdddf22509691a4f285305e9fd83291 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 13 Aug 2013 15:06:42 +0000 Subject: QPID-5040: support for sending and receiving messages with AmqpValue sections git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513536 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/examples/messaging/map_receiver.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'qpid/cpp/examples/messaging/map_receiver.cpp') diff --git a/qpid/cpp/examples/messaging/map_receiver.cpp b/qpid/cpp/examples/messaging/map_receiver.cpp index 081f7394a8..96bc76b821 100644 --- a/qpid/cpp/examples/messaging/map_receiver.cpp +++ b/qpid/cpp/examples/messaging/map_receiver.cpp @@ -39,15 +39,13 @@ int main(int argc, char** argv) { const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672"; const char* address = argc>2 ? argv[2] : "message_queue; {create: always}"; std::string connectionOptions = argc > 3 ? argv[3] : ""; - + Connection connection(url, connectionOptions); try { connection.open(); Session session = connection.createSession(); Receiver receiver = session.createReceiver(address); - Variant::Map content; - decode(receiver.fetch(), content); - std::cout << content << std::endl; + std::cout << receiver.fetch().getContentObject() << std::endl; session.acknowledge(); receiver.close(); connection.close(); @@ -56,5 +54,5 @@ int main(int argc, char** argv) { std::cout << error.what() << std::endl; connection.close(); } - return 1; + return 1; } -- cgit v1.2.1