diff options
| author | Aidan Skinner <aidan@apache.org> | 2009-10-11 23:22:08 +0000 |
|---|---|---|
| committer | Aidan Skinner <aidan@apache.org> | 2009-10-11 23:22:08 +0000 |
| commit | 98cc985dbd81a84cd0b0a969c57cb941680ec81f (patch) | |
| tree | a9060c1f208897cbd9dd4791b29202c78566993b /qpid/cpp/src/tests/MessageUtils.h | |
| parent | 788f96fd8af146cba5bff57300b1a513988c34b9 (diff) | |
| download | qpid-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.h | 5 |
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; } |
