RockteMQ-AI commented on issue #10671:
URL: https://github.com/apache/rocketmq/issues/10671#issuecomment-5111974438

   **Issue Evaluation**
   
   Category: `type/enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** Proxy gRPC module 
(`proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/`)
   **Compatibility:** No breaking changes — purely additive improvements
   
   **Analysis:**
   
   The issue is valid. Current Proxy behavior when handling 
unsupported/unrecognized client types:
   
   1. **Client type routing** (`ClientActivity.java`): The `heartbeat()` and 
`notifyClientTermination()` methods have switch cases for `PUSH_CONSUMER`, 
`LITE_PUSH_CONSUMER`, `SIMPLE_CONSUMER`, `LITE_SIMPLE_CONSUMER`, and 
`PRODUCER`. Unrecognized types fall through to a `default` case returning 
`UNRECOGNIZED_CLIENT_TYPE` status.
   
   2. **Stream initialization** (`processAndWriteClientSettings()`): When 
`PubSubCase` is `PUBSUB_NOT_SET`, the Proxy returns `INVALID_ARGUMENT` with 
description "there is no publishing or subscription data in settings" — this is 
one of the few places with a descriptive error.
   
   3. **Logging gap**: The `onError()` handler in telemetry stream logs 
`"telemetry on error"` but does not include client type or rejection reason 
context.
   
   **Suggested improvements:**
   
   - Add `log.warn()` in the `default` switch branch of `heartbeat()` / 
`notifyClientTermination()` with client ID and rejected client type
   - Enhance the gRPC status description to include the unsupported client type 
name and suggest alternatives
   - Add structured logging in `processTelemetryException()` with 
`ProxyContext` details (clientId, clientType, language)
   
   **Estimated effort:** Simple — primarily adding log statements and enriching 
existing error descriptions.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to