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

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Summary
   
   The problem is 
[`service.proto`](https://github.com/apache/rocketmq-clients/blob/master/cpp/proto/apache/rocketmq/v2/service.proto)
 declares `QueryOffset`, `GetOffset`, `UpdateOffset`, and `PullMessage` on 
`MessagingService`. The proxy's gRPC server 
([`GrpcMessagingApplication.java`](https://github.com/apache/rocketmq/blob/develop/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java))
 has no `@Override` methods for them, so every call returns `UNIMPLEMENTED`. 
Verified live against RocketMQ 5.3.2.
   
   ### Motivation
   
   Any tool built on the v5 client (autoscalers, exporters, lag dashboards) 
can't read offsets through the official gRPC API. They have to fall back to the 
legacy remoting protocol — which is exactly what v5 was supposed to replace. 
Concrete consumer: 
[kedacore/keda#6149](https://github.com/kedacore/keda/issues/6149) — RocketMQ 
autoscaling in KEDA.
   
   ### Describe the Solution You'd Like
   
   The proxy **already has** the Java methods that would do the work — they're 
in 
[`MessagingProcessor`](https://github.com/apache/rocketmq/blob/develop/proxy/src/main/java/org/apache/rocketmq/proxy/processor/MessagingProcessor.java):
   
   - `getMaxOffset(ctx, mq, timeoutMillis)` — already used internally
   - `queryConsumerOffset(ctx, mq, group, timeoutMillis)` — already used 
internally
   
   Both call the broker via the existing remoting opcodes (`GET_MAX_OFFSET=30`, 
`QUERY_CONSUMER_OFFSET=14`). So adding the gRPC overrides is pure wiring at one 
layer — no new business logic, no broker-side changes, no proto changes.
   
   ### Proposed change
   
   - New `proxy/.../grpc/v2/consumer/OffsetActivity.java` (mirrors 
`RouteActivity`).
   - Add `@Override queryOffset` + `@Override getOffset` to 
`GrpcMessagingApplication` (copy the `queryRoute` template at line 204).
   - Wire through `GrpcMessagingActivity` + `DefaultGrpcMessagingActivity`.
   - Unit tests against a mocked `MessagingProcessor`.
   
   ### Describe Alternatives You've Considered
   
   -
   
   ### 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: [email protected]

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

Reply via email to