diff options
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++){ |