diff options
| author | Gordon Sim <gsim@apache.org> | 2007-10-11 09:20:18 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-10-11 09:20:18 +0000 |
| commit | 0c43055f92ce5ddf5e1232a11da291e4b2d03c94 (patch) | |
| tree | 3345ecec0929d73766eafd6d306c2c801bec0dc0 /cpp/src | |
| parent | c28378f77743c198c79c7046fa1d9a445c27b897 (diff) | |
| download | qpid-python-0c43055f92ce5ddf5e1232a11da291e4b2d03c94.tar.gz | |
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
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/broker/DeliveryRecord.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 |
