From 040fd21b2b5097146f4df71c714c99c40586097f Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 11 Oct 2007 09:20:18 +0000 Subject: Requeue messages for cancelled subscriptions on reciver (rather than redelivering) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@583750 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/DeliveryRecord.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qpid/cpp') diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp b/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp index eff4cf7a74..850f97cba9 100644 --- a/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp +++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp @@ -79,9 +79,13 @@ bool DeliveryRecord::coveredBy(const framing::AccumulatedAck* const range) const } void DeliveryRecord::redeliver(SemanticState* const session) { - if (!confirmed && !cancelled) { - if(pull){ + if (!confirmed) { + if(pull || cancelled){ //if message was originally sent as response to get, we must requeue it + + //or if subscription was cancelled, requeue it (waiting for + //final confirmation for AMQP WG on this case) + requeue(); }else{ msg.payload->redeliver();//mark as redelivered -- cgit v1.2.1