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
- Create a producer
Settings telemetry command.
- Set the context language to
UNKNOWN_LANGUAGE.
- Submit it to
ClientActivity.telemetry.
- 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.
Runtime platform environment
All platforms; reproduced by a unit test on the current
developbranch.RocketMQ version
developate3458616d207ee636b1762f0f8dcf788a590d59d.Describe the Bug
ContextInitPipelinecopies the client-controlled gRPClanguagemetadata intoProxyContextwithout validation.ClientActivitylater callsLanguageCode.valueOf(ctx.getLanguage())while registering producer and consumer channels.An unknown language therefore throws
IllegalArgumentException. The telemetry exception handler converts it to gRPCINTERNAL, so malformed client input is reported as a server failure.Steps to Reproduce
Settingstelemetry command.UNKNOWN_LANGUAGE.ClientActivity.telemetry.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
LanguageCodeparsing inClientActivity, convert invalid values toGrpcProxyExceptionwith a bad-request code, and add regression coverage for the telemetry path.