Why is MAX_MSG_NUMS_FOR_POP_REQUEST Hard-Limited to 32 in Proxy? Can It Be Made Configurable? #9920
Polaris999
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using RocketMQ 5.x with SimpleConsumer (POP).
While testing batch consumption, I found that even if the client sets a higher maxMessageNum (e.g. 128 or 256), the Proxy will always override it to 32.
The related code is in ProxyUtils:
And MAX_MSG_NUMS_FOR_POP_REQUEST is hard-coded as:
public static final int MAX_MSG_NUMS_FOR_POP_REQUEST = 32;❓My Questions
Why is POP batch size strictly limited to 32?
What is the design consideration?
Is it related to POP buffer, invisible time window, lock contention, or memory pressure?
Could this value be made configurable (e.g., via system property / proxy config / environment variable), instead of a hard constant?
💡 Use Case
We have scenarios where:
Each message is very small
POP consumer concurrency is already well-scaled
Pulling only 32 messages per batch significantly limits throughput
Increasing batch size (e.g., 64 or 128) would greatly reduce broker round-trips and increase consumption efficiency
Thank you very much for your work and support!
Beta Was this translation helpful? Give feedback.
All reactions