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: [email protected]

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

Reply via email to