CG: implement RETRYCOUNT in XCLAIM.

This commit is contained in:
antirez 2018-03-02 16:23:34 +01:00
parent f3d9520ccb
commit e6d434c167

View File

@ -1788,6 +1788,8 @@ void xclaimCommand(client *c) {
/* Update the consumer and idle time. */ /* Update the consumer and idle time. */
nack->consumer = consumer; nack->consumer = consumer;
nack->delivery_time = deliverytime; nack->delivery_time = deliverytime;
/* Set the delivery attempts counter if given. */
if (retrycount >= 0) nack->delivery_count = retrycount;
/* Add the entry in the new cosnumer local PEL. */ /* Add the entry in the new cosnumer local PEL. */
raxInsert(consumer->pel,buf,sizeof(buf),nack,NULL); raxInsert(consumer->pel,buf,sizeof(buf),nack,NULL);
/* Send the reply for this entry. */ /* Send the reply for this entry. */