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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to