summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/Selector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Selector.cpp b/qpid/cpp/src/qpid/broker/Selector.cpp
index 40a0f019ab..b9888b4cd4 100644
--- a/qpid/cpp/src/qpid/broker/Selector.cpp
+++ b/qpid/cpp/src/qpid/broker/Selector.cpp
@@ -92,7 +92,9 @@ const Value MessageSelectorEnv::specialValue(const string& id) const
if ( id=="delivery_mode" ) {
v = msg.getEncoding().isPersistent() ? PERSISTENT : NON_PERSISTENT;
} else if ( id=="redelivered" ) {
- v = msg.getDeliveryCount()>0 ? true : false;
+ // Although redelivered is defined to be true delivery-count>0 if it is 0 now
+ // it will be 1 by the time the message is delivered
+ v = msg.getDeliveryCount()>=0 ? true : false;
} else if ( id=="priority" ) {
v = int64_t(msg.getPriority());
} else if ( id=="correlation_id" ) {