You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "dcsmf (via GitHub)" <gi...@apache.org> on 2026/07/29 01:53:42 UTC

[I] [Feature] Proxy should provide clearer diagnostics when rejecting unsupported gRPC client types [rocketmq]

dcsmf opened a new issue, #10671:
URL: https://github.com/apache/rocketmq/issues/10671

   ### Is Your Feature Request Related to a Problem?
   
   When using the gRPC Java SDK, I attempted to create a LitePushConsumer.
   
   The current Proxy implementation does not support LitePushConsumer, so the server closes the stream during initialization.
   
   However, the client only receives the following exception:
   
   `java.lang.IllegalStateException: Stream is already completed, no further calls are allowed`
   
   This exception does not indicate the real cause of the failure. There is also no corresponding Proxy log explaining why the connection was terminated.
   
   ### Describe the Solution You'd Like
   
   When the Proxy rejects or terminates a client connection because the requested consumer type is unsupported, it should:
   
   Log the actual reason on the Proxy side.
   Return a more descriptive gRPC status/message if possible (for example, indicating that LitePushConsumer is not currently supported).
   
   This would make troubleshooting much easier than relying on generic client-side exceptions.
   
   ### Describe Alternatives You've Considered
   
   Currently the only way to identify the root cause is to inspect the Proxy implementation or debug the server, since neither the client exception nor the server logs explain why the connection was closed.
   
   ### Additional Context
   
   _No response_


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature] Proxy should provide clearer diagnostics when rejecting unsupported gRPC client types [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature] Proxy should provide clearer diagnostics when rejecting unsupported gRPC client types [rocketmq]

Posted by "twei43846-afk (via GitHub)" <gi...@apache.org>.
twei43846-afk commented on issue #10671:
URL: https://github.com/apache/rocketmq/issues/10671#issuecomment-5151677388

   I would like to work on this. My plan is to keep the change small: enrich the Proxy gRPC unsupported-client-type status message in heartbeat / client termination paths and add focused ClientActivityTest coverage so the rejected type and troubleshooting hint are visible to clients. I will recheck for overlapping PRs before opening one.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org