Only increment delivery count if JUSTID option is omitted

This commit is contained in:
Steve Webster
2019-03-12 20:27:53 +00:00
parent f1e7df4b7c
commit dfcb227b50
2 changed files with 18 additions and 3 deletions

View File

@ -2279,10 +2279,11 @@ void xclaimCommand(client *c) {
/* Update the consumer and idle time. */
nack->consumer = consumer;
nack->delivery_time = deliverytime;
/* Set the delivery attempts counter if given, otherwise autoincrement */
/* Set the delivery attempts counter if given, otherwise
* autoincrement unless JUSTID option provided */
if (retrycount >= 0) {
nack->delivery_count = retrycount;
} else {
} else if (!justid) {
nack->delivery_count++;
}
/* Add the entry in the new consumer local PEL. */