diff options
| author | Gordon Sim <gsim@apache.org> | 2013-08-30 12:31:45 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-08-30 12:31:45 +0000 |
| commit | 425ab451141331c183b03277cf35c00c3e9d6654 (patch) | |
| tree | cead47eaf1a321d22d08d46eca21a5c65cd39e77 /cpp/examples/messaging/drain.cpp | |
| parent | d88d41f66a1f87966fe988ae168f6ce15dbe0603 (diff) | |
| download | qpid-python-425ab451141331c183b03277cf35c00c3e9d6654.tar.gz | |
QPID-5040: fix for string and symbol types on AmqpValue section (also clear message on fetch())
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1518955 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/examples/messaging/drain.cpp')
| -rw-r--r-- | cpp/examples/messaging/drain.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/examples/messaging/drain.cpp b/cpp/examples/messaging/drain.cpp index fe4ea7950d..6ac1d3a236 100644 --- a/cpp/examples/messaging/drain.cpp +++ b/cpp/examples/messaging/drain.cpp @@ -92,11 +92,15 @@ int main(int argc, char** argv) int i = 0; while (receiver.fetch(message, timeout)) { - std::cout << "Message(properties=" << message.getProperties() << ", content='" ; + std::cout << "Message(properties=" << message.getProperties(); + if (!message.getSubject().empty()) { + std::cout << ", subject='" << message.getSubject() << "'"; + } + std::cout << ", content='"; if (message.getContentType() == "amqp/map") { std::cout << message.getContentObject().asMap(); } else { - std::cout << message.getContent(); + std::cout << message.getContentObject(); } std::cout << "')" << std::endl; session.acknowledge(); |
