Skip to content

[Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL #10890

Description

@Aias00

Runtime platform environment

All platforms; reproduced by a unit test on the current develop branch.

RocketMQ version

develop at e3458616d207ee636b1762f0f8dcf788a590d59d.

Describe the Bug

ContextInitPipeline copies the client-controlled gRPC language metadata into ProxyContext without validation. ClientActivity later calls LanguageCode.valueOf(ctx.getLanguage()) while registering producer and consumer channels.

An unknown language therefore throws IllegalArgumentException. The telemetry exception handler converts it to gRPC INTERNAL, so malformed client input is reported as a server failure.

Steps to Reproduce

  1. Create a producer Settings telemetry command.
  2. Set the context language to UNKNOWN_LANGUAGE.
  3. Submit it to ClientActivity.telemetry.
  4. Observe gRPC status INTERNAL.

Expected Behavior

Invalid or missing language metadata is rejected as a client-input error (INVALID_ARGUMENT) before channel registration.

Actual Behavior

The request receives INTERNAL.

Proposed Fix

Centralize LanguageCode parsing in ClientActivity, convert invalid values to GrpcProxyException with a bad-request code, and add regression coverage for the telemetry path.

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