You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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 msgreviveTime
, or the memory retention time exceedsMAX_STAY_TIME_MS
, a service thread will request a batch ack to the corresponding broker.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.
The text was updated successfully, but these errors were encountered: