You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "f1amingo (via GitHub)" <gi...@apache.org> on 2023/05/31 11:42:19 UTC

[GitHub] [rocketmq] f1amingo opened a new issue, #6841: [Feature] pop batch ack for pushConsumer

f1amingo opened a new issue, #6841:
URL: https://github.com/apache/rocketmq/issues/6841

   ### Is Your Feature Request Related to a Problem?
   
   Currently, the POP consumer can pull up to 32 messages in batch, but after consuming one message, it needs to immediately ack once without achieving batching, which is inefficient and consumes bandwidth and CPU resources for both consumers and brokers.
   To address this issue, we propose a solution of POP batch ack.
   
   ### Describe the Solution You'd Like
   
   The client consumption logic remains unchanged. When preparing to send an ACK request after successfully consuming a message, only cache the ACK in memory and the request to Broker is not actually made at this time.
   
   Meanwhile, when the number of cached ACKs exceeds `MAX_COUNT_IN_BATCH`, or approaches the msg `reviveTime`, or the memory retention time exceeds `MAX_STAY_TIME_MS`, a service thread will request a batch ack to the corresponding broker.
   
   > [consumerThread1] -----(ackInMem)----------↓             
   > [consumerThread2]---(ackInMem)---> [BatchAckService] ---(batchAckAsync)--->  Broker
   > ... ...
   > [consumerThreadn] -----(ackInMem)---------↑
   
   ### Describe Alternatives You've Considered
   
   None.
   
   ### Additional Context
   
   I will submit a pull request later. 
   The submitted code has been thoroughly tested and has a large number of unit tests. 
   This pop batch ack implementation can fully support the existing single ack and FIFO message ack.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] drpmma closed issue #6841: [Feature] pop batch ack for pushConsumer

Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma closed issue #6841: [Feature] pop batch ack for pushConsumer
URL: https://github.com/apache/rocketmq/issues/6841


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org