From 0c43055f92ce5ddf5e1232a11da291e4b2d03c94 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/qpid@583750 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/DeliveryRecord.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/broker/DeliveryRecord.cpp b/cpp/src/qpid/broker/DeliveryRecord.cpp index eff4cf7a74..850f97cba9 100644 --- a/cpp/src/qpid/broker/DeliveryRecord.cpp +++ b/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