diff options
author | Kim van der Riet <kpvdr@apache.org> | 2009-09-22 17:36:01 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2009-09-22 17:36:01 +0000 |
commit | 410f2e510147b502ad3b625572b2a337e550f63b (patch) | |
tree | 19d73cde089367fc8f633e6f9ad7cb44e83c8f1e /qpid/cpp/src/tests/MessageUtils.h | |
parent | 3173dac08fc9302d055151834dd7c721be1a6c27 (diff) | |
download | qpid-python-410f2e510147b502ad3b625572b2a337e550f63b.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@817742 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; } |