summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/MessageUtils.h
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2009-10-11 23:22:08 +0000
committerAidan Skinner <aidan@apache.org>2009-10-11 23:22:08 +0000
commit98cc985dbd81a84cd0b0a969c57cb941680ec81f (patch)
treea9060c1f208897cbd9dd4791b29202c78566993b /qpid/cpp/src/tests/MessageUtils.h
parent788f96fd8af146cba5bff57300b1a513988c34b9 (diff)
downloadqpid-python-98cc985dbd81a84cd0b0a969c57cb941680ec81f.tar.gz
Merge from trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-network-refactor@824198 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/MessageUtils.h')
-rw-r--r--qpid/cpp/src/tests/MessageUtils.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/MessageUtils.h b/qpid/cpp/src/tests/MessageUtils.h
index dae74cce7d..a1b140d484 100644
--- a/qpid/cpp/src/tests/MessageUtils.h
+++ b/qpid/cpp/src/tests/MessageUtils.h
@@ -34,7 +34,8 @@ namespace tests {
struct MessageUtils
{
static boost::intrusive_ptr<Message> createMessage(const string& exchange="", const string& routingKey="",
- const Uuid& messageId=Uuid(true), uint64_t contentSize = 0)
+ const bool durable = false, const Uuid& messageId=Uuid(true),
+ uint64_t contentSize = 0)
{
boost::intrusive_ptr<broker::Message> msg(new broker::Message());
@@ -47,6 +48,8 @@ struct MessageUtils
props->setContentLength(contentSize);
props->setMessageId(messageId);
msg->getFrames().getHeaders()->get<DeliveryProperties>(true)->setRoutingKey(routingKey);
+ if (durable)
+ msg->getFrames().getHeaders()->get<DeliveryProperties>(true)->setDeliveryMode(2);
return msg;
}