summaryrefslogtreecommitdiff
path: root/cpp/src/tests/MessageUtils.h
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2009-09-22 17:36:01 +0000
committerKim van der Riet <kpvdr@apache.org>2009-09-22 17:36:01 +0000
commitf13c131456c4fb0a027513242f2d8253aad75ca0 (patch)
tree5ccd77aeb648695b41c0444e44ffa039e012d124 /cpp/src/tests/MessageUtils.h
parent3d3fb015b49b088a6e1f641437cd6b7acb0ed6ec (diff)
downloadqpid-python-f13c131456c4fb0a027513242f2d8253aad75ca0.tar.gz
Joint checkin from gsim, kpvdr, cctrieloff. See QPID-2102: Exceeding reject queue policy under a transaction causes broker crash
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817742 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/MessageUtils.h')
-rw-r--r--cpp/src/tests/MessageUtils.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/tests/MessageUtils.h b/cpp/src/tests/MessageUtils.h
index dae74cce7d..a1b140d484 100644
--- a/cpp/src/tests/MessageUtils.h
+++ b/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;
}