Skip to content

[Bug] Proxy gRPC ack accepts empty entries until IndexOutOfBoundsException #10678

Description

@Aias00

Before Creating the Bug Report

  • I have searched the existing issues and pull requests.

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

  1. Send an AckMessageRequest with valid topic and group, but no entries.
  2. Let Proxy handle the request through AckMessageActivity.ackMessage.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions