diff options
author | Gordon Sim <gsim@apache.org> | 2006-09-27 16:44:02 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2006-09-27 16:44:02 +0000 |
commit | 9d718c2348708b0b27ce9fb9fcbf05c4b0a997cc (patch) | |
tree | 4bea6ff87d58d3db712cbc727b9723680b1b981a /cpp/broker/src/Message.cpp | |
parent | 72aff4cc22932bd98b542ac9dd6393e23985e312 (diff) | |
download | qpid-python-9d718c2348708b0b27ce9fb9fcbf05c4b0a997cc.tar.gz |
Moved ack tests to basic class, added test for requeueing on recovery.
Implemented requeuing on recovery.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@450504 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/broker/src/Message.cpp')
-rw-r--r-- | cpp/broker/src/Message.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/broker/src/Message.cpp b/cpp/broker/src/Message.cpp index 7afcd97934..8ebe40410a 100644 --- a/cpp/broker/src/Message.cpp +++ b/cpp/broker/src/Message.cpp @@ -32,7 +32,8 @@ Message::Message(const ConnectionToken* const _publisher, exchange(_exchange), routingKey(_routingKey), mandatory(_mandatory), - immediate(_immediate){ + immediate(_immediate), + redelivered(false){ } @@ -51,11 +52,15 @@ bool Message::isComplete(){ return header.get() && (header->getContentSize() == contentSize()); } +void Message::redeliver(){ + redelivered = true; +} + void Message::deliver(OutputHandler* out, int channel, string& consumerTag, u_int64_t deliveryTag, u_int32_t framesize){ - out->send(new AMQFrame(channel, new BasicDeliverBody(consumerTag, deliveryTag, false, exchange, routingKey))); + out->send(new AMQFrame(channel, new BasicDeliverBody(consumerTag, deliveryTag, redelivered, exchange, routingKey))); AMQBody::shared_ptr headerBody = static_pointer_cast<AMQBody, AMQHeaderBody>(header); out->send(new AMQFrame(channel, headerBody)); for(content_iterator i = content.begin(); i != content.end(); i++){ |