You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zhaohai666 (via GitHub)" <gi...@apache.org> on 2026/07/31 02:33:27 UTC
[PR] Feature/rip 2 pr1 proto serialization [rocketmq]
zhaohai666 opened a new pull request, #10702:
URL: https://github.com/apache/rocketmq/pull/10702
# PR Description: RIP-2 Proxy Admin Interface - PR#1 Foundation Proto & Serialization
## Background
This pull request delivers the foundational protocol definition and serialization infrastructure for the Proxy Admin gRPC service under RIP-2 (Proxy Admin Interface). It is the first atomic PR of a six-PR sequence that fully implements the complete Proxy Admin capability suite.
## Design Overview
### 1. gRPC Protocol Definition (`proxy_admin.proto`)
A brand-new gRPC service `ProxyAdminService` is defined, exposing six core RPC endpoints covering client, route, consumer and receipt lifecycle management:
1. `ListClients`: Query online connected client instances with multi-condition filtering
2. `GetClientDetail`: Fetch full diagnostic metrics and metadata of a single target client
3. `GetTopicRoute`: Retrieve real-time topic route distribution data
4. `WatchRouteChange`: Server-streaming RPC to push incremental route modification events
5. `GetConsumeDiagnostics`: Pull consumer group runtime diagnostics for batch & pop consume modes
6. `GetReceiptHandleInfo`: Inspect receipt handle state and full lifecycle information
### 2. Serialization Abstraction Layer
Two core utility classes decouple raw Protobuf logic from internal domain business models:
- `ProxyAdminMarshaller`: Customized gRPC message marshaller, handles corner cases including nullable fields and unrecognized enum values during serialize/deserialize cycles
- `ProxyAdminProtoConverter`: Bidirectional mapper converting internal domain objects ↔ Protobuf DTOs, isolates proto schema changes from core business code
- `AdminCode`: Global standardized error code enum to unify error response logic across all Proxy Admin APIs
### 3. Build & Code Style Integration
- Configure Protobuf compilation plugin & dependencies in Maven (`pom.xml`)
- Extend Bazel `BUILD.bazel` rules to compile the new admin protobuf definitions
- Add dedicated Checkstyle suppression rules for auto-generated Protobuf code to avoid static analysis failures
## Modified & New File Scope
| File Path | File Type | Change Type | Brief Description |
| ---- | ---- | ---- | ---- |
| `proxy/src/main/proto/proxy_admin.proto` | Proto File | New | Core gRPC service & message schema (606 lines) |
| `AdminCode.java` | Java Source | New | Standardized admin API error code enumeration |
| `ProxyAdminMarshaller.java` | Java Source | New | Protobuf serialize/deserialize handler |
| `ProxyAdminProtoConverter.java` | Java Source | New | Bidirectional converter for domain ↔ proto objects |
| `proxy/pom.xml` | Maven Config | Modified | Add protobuf compile dependencies & plugin config |
| `proxy/BUILD.bazel` | Bazel Build Config | Modified | Add proto compile targets for Proxy Admin service |
| `style/rmq_checkstyle.xml` | Checkstyle Rule | Modified | Extend style rules for admin package |
| `style/rmq_checkstyle_suppressions.xml` | Checkstyle Suppression | New | Suppress style violations from auto-generated proto code |
| `ProxyAdminMarshallerTest.java` | Test Source | New | Unit tests covering marshaller round-trip & edge cases |
| `ProxyAdminProtoConverterTest.java` | Test Source | New | Full coverage converter unit tests (1003 lines) |
Total: 10 files changed, +3217 lines of code added
## Dependencies
No upstream dependency changes. This PR provides the base foundation for all subsequent RIP-2 Proxy Admin iterations.
## Test Coverage & Validation
### Marshaller Unit Tests
- End-to-end round-trip serialization & deserialization verification
- Nullable field read/write edge case validation
- Compatibility test for unrecognized enum values and unknown proto fields
### Proto Converter Unit Tests
- Full mapping coverage for all defined Protobuf request/response message types
- Boundary value conversion validation
- Strict enum bidirectional mapping consistency checks
## Development Branch
`feature/rip-2-pr1-proto-serialization`
## Related Tracking
RIP-2: Proxy Admin Interface
This PR is Step 1 / 6 of the full Proxy Admin feature implementation sequence.
--
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: [PR] [Studio] feat: Feature/rip 2 pr1 proto serialization [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10702:
URL: https://github.com/apache/rocketmq/pull/10702#issuecomment-5140068050
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10702?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `31.28342%` with `257 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 48.15%. Comparing base ([`d8c3f9e`](https://app.codecov.io/gh/apache/rocketmq/commit/d8c3f9e735c482f5e2be77dc40681a2e2ad9471e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`50faf99`](https://app.codecov.io/gh/apache/rocketmq/commit/50faf99f436569923a68d58444fcead1629ab37f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on develop.
| [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/10702?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...ketmq/proxy/grpc/admin/model/ClientDetailInfo.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fgrpc%2Fadmin%2Fmodel%2FClientDetailInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvYWRtaW4vbW9kZWwvQ2xpZW50RGV0YWlsSW5mby5qYXZh) | 0.00% | [72 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...tmq/proxy/grpc/admin/model/ClientInstanceInfo.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fgrpc%2Fadmin%2Fmodel%2FClientInstanceInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvYWRtaW4vbW9kZWwvQ2xpZW50SW5zdGFuY2VJbmZvLmphdmE=) | 0.00% | [33 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...mq/proxy/common/BatchConsumeClientDiagnostics.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fcommon%2FBatchConsumeClientDiagnostics.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9CYXRjaENvbnN1bWVDbGllbnREaWFnbm9zdGljcy5qYXZh) | 0.00% | [30 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...he/rocketmq/proxy/common/PopReceiptHandleInfo.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fcommon%2FPopReceiptHandleInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9Qb3BSZWNlaXB0SGFuZGxlSW5mby5qYXZh) | 0.00% | [30 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...etmq/proxy/grpc/admin/model/ListClientsFilter.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fgrpc%2Fadmin%2Fmodel%2FListClientsFilter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvYWRtaW4vbW9kZWwvTGlzdENsaWVudHNGaWx0ZXIuamF2YQ==) | 0.00% | [21 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...rg/apache/rocketmq/proxy/grpc/admin/AdminCode.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fgrpc%2Fadmin%2FAdminCode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvYWRtaW4vQWRtaW5Db2RlLmphdmE=) | 0.00% | [19 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ocketmq/proxy/common/BatchConsumeGroupSummary.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fcommon%2FBatchConsumeGroupSummary.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9CYXRjaENvbnN1bWVHcm91cFN1bW1hcnkuamF2YQ==) | 0.00% | [16 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../org/apache/rocketmq/proxy/config/ProxyConfig.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fconfig%2FProxyConfig.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbmZpZy9Qcm94eUNvbmZpZy5qYXZh) | 50.00% | [16 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...tmq/proxy/common/PopReceiptHandleGroupSummary.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fcommon%2FPopReceiptHandleGroupSummary.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9Qb3BSZWNlaXB0SGFuZGxlR3JvdXBTdW1tYXJ5LmphdmE=) | 0.00% | [14 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...org/apache/rocketmq/proxy/common/ProxyContext.java](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fcommon%2FProxyContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9Qcm94eUNvbnRleHQuamF2YQ==) | 0.00% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #10702 +/- ##
=============================================
- Coverage 48.32% 48.15% -0.18%
- Complexity 13511 13523 +12
=============================================
Files 1380 1392 +12
Lines 101091 101465 +374
Branches 13101 13102 +1
=============================================
+ Hits 48854 48862 +8
- Misses 46276 46621 +345
- Partials 5961 5982 +21
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10702?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: [PR] [Studio] feat: Feature/rip 2 pr1 proto serialization [rocketmq]
Posted by "zhaohai666 (via GitHub)" <gi...@apache.org>.
zhaohai666 closed pull request #10702: [Studio] feat: Feature/rip 2 pr1 proto serialization
URL: https://github.com/apache/rocketmq/pull/10702
--
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