summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-03-29 19:21:26 +0000
committerGordon Sim <gsim@apache.org>2010-03-29 19:21:26 +0000
commitbeb68a5d1b8d74f4c53299c81911a3ad85011f17 (patch)
tree2d444776e69aed493d522d3efb90990570f42f0d /qpid/cpp/examples
parent3d990371a345d1760cebd7dc0e47365034cfe2d4 (diff)
downloadqpid-python-beb68a5d1b8d74f4c53299c81911a3ad85011f17.tar.gz
QPID-664: renamed headers as properties (to match python); added priority
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@928878 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples')
-rw-r--r--qpid/cpp/examples/messaging/drain.cpp2
-rw-r--r--qpid/cpp/examples/messaging/spout.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/qpid/cpp/examples/messaging/drain.cpp b/qpid/cpp/examples/messaging/drain.cpp
index 05e6f23642..a2bb1c9d3a 100644
--- a/qpid/cpp/examples/messaging/drain.cpp
+++ b/qpid/cpp/examples/messaging/drain.cpp
@@ -102,7 +102,7 @@ int main(int argc, char** argv)
Duration timeout = options.getTimeout();
Message message;
while (receiver.fetch(message, timeout)) {
- std::cout << "Message(properties=" << message.getHeaders() << ", content='" ;
+ std::cout << "Message(properties=" << message.getProperties() << ", content='" ;
if (message.getContentType() == "amqp/map") {
std::cout << MapView(message);
} else {
diff --git a/qpid/cpp/examples/messaging/spout.cpp b/qpid/cpp/examples/messaging/spout.cpp
index e9a6987f5c..4b67945317 100644
--- a/qpid/cpp/examples/messaging/spout.cpp
+++ b/qpid/cpp/examples/messaging/spout.cpp
@@ -125,9 +125,9 @@ struct Options : public qpid::Options
std::string name;
std::string value;
if (nameval(property, name, value)) {
- message.getHeaders()[name] = value;
+ message.getProperties()[name] = value;
} else {
- message.getHeaders()[name] = Variant();
+ message.getProperties()[name] = Variant();
}
}
@@ -177,7 +177,7 @@ int main(int argc, char** argv)
for (uint count = 0; (count < options.count || options.count == 0) && end > now(); count++) {
if (!options.replyto.empty()) message.setReplyTo(Address(options.replyto));
std::string id = options.id.empty() ? Uuid(true).str() : options.id;
- message.getHeaders()["spout-id"] = (boost::format("%1%:%2%") % id % count).str();
+ message.getProperties()["spout-id"] = (boost::format("%1%:%2%") % id % count).str();
sender.send(message);
}
connection.close();