Before Creating the Bug Report
Runtime platform environment
All platforms.
RocketMQ version
develop branch.
JDK Version
Not applicable.
Describe the Bug
AckMessageActivity.ackMessage reads the first ack entry before validating that the request contains any entries:
boolean isBatchAck = ConfigurationManager.getProxyConfig().isEnableBatchAck()
&& !request.getEntries(0).hasLiteTopic();
If a gRPC client sends an AckMessageRequest with an empty entries list, this path throws an IndexOutOfBoundsException. That makes an invalid client request look like an internal Proxy failure instead of a structured gRPC bad-request response.
Steps to Reproduce
- Send an
AckMessageRequest with valid topic and group, but no entries.
- Let Proxy handle the request through
AckMessageActivity.ackMessage.
request.getEntries(0) is evaluated before entry-count validation.
What Did You Expect to See?
Proxy should reject the request with a structured client-side error, for example GrpcProxyException(Code.BAD_REQUEST, "ack message entries cannot be empty").
What Did You See Instead?
Proxy throws IndexOutOfBoundsException while trying to access the first entry.
Additional Context
This is a small gRPC Proxy request validation hardening issue. It keeps invalid client input from surfacing as an internal server error and makes the behavior easier for clients and operators to diagnose.
Before Creating the Bug Report
Runtime platform environment
All platforms.
RocketMQ version
develop branch.
JDK Version
Not applicable.
Describe the Bug
AckMessageActivity.ackMessagereads the first ack entry before validating that the request contains any entries:If a gRPC client sends an
AckMessageRequestwith an emptyentrieslist, this path throws anIndexOutOfBoundsException. That makes an invalid client request look like an internal Proxy failure instead of a structured gRPC bad-request response.Steps to Reproduce
AckMessageRequestwith validtopicandgroup, but noentries.AckMessageActivity.ackMessage.request.getEntries(0)is evaluated before entry-count validation.What Did You Expect to See?
Proxy should reject the request with a structured client-side error, for example
GrpcProxyException(Code.BAD_REQUEST, "ack message entries cannot be empty").What Did You See Instead?
Proxy throws
IndexOutOfBoundsExceptionwhile trying to access the first entry.Additional Context
This is a small gRPC Proxy request validation hardening issue. It keeps invalid client input from surfacing as an internal server error and makes the behavior easier for clients and operators to diagnose.