lizhimins opened a new issue, #1286:
URL: https://github.com/apache/rocketmq-clients/issues/1286

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   ### Programming Language of the Client
   
   Java
   
   ### Summary
   
   Add a `proto` module to the Java Maven reactor that compiles `.proto` files 
from the `protos/` submodule (rocketmq-apis) into a `rocketmq-proto` JAR, 
replacing the dependency on a pre-published Maven Central artifact.
   
   ### Motivation
   
   The Java client currently depends on `org.apache.rocketmq:rocketmq-proto` 
published to Maven Central. This creates a coupling between proto changes and 
client development:
   
   - PR #1237 (Support client properties in Java client) bumped the proto 
version to `2.2.0`, but that version has not been published to Maven Central 
yet, causing **all CI jobs to fail** with `Could not find artifact 
org.apache.rocketmq:rocketmq-proto:jar:2.2.0`.
   - Proto and client changes cannot be developed and tested together in a 
single PR without waiting for a proto release.
   
   Other language clients (C++, Rust, C#, Node.js) already compile proto from 
the submodule during their build. Java should follow the same pattern.
   
   ### Describe the Solution You'd Like
   
   1. **Update `protos/` submodule** to the latest `main` (which includes the 
`client_properties` field from 
[rocketmq-apis#108](https://github.com/apache/rocketmq-apis/issues/108)).
   2. **Add `java/proto/pom.xml`** using `protobuf-maven-plugin` to compile the 
3 `.proto` files (`definition.proto`, `service.proto`, `admin.proto`) and 
generate gRPC stubs.
   3. **Add `proto` as the first module** in the parent POM reactor, so other 
modules resolve `rocketmq-proto` from the reactor instead of Maven Central.
   4. **Update CI workflows** (`java_build.yml`, `java_coverage.yml`) to 
checkout submodules (`submodules: recursive`).
   
   ### Describe Alternatives You've Considered
   
   1. **Publish `rocketmq-proto:2.2.0` first** — works but requires 
coordination and blocks client PRs on proto release cycles.
   2. **Keep using Maven Central artifact** — same coupling problem persists 
for future proto changes.
   
   ### Additional Context
   
   - Proto files only import `google/protobuf/duration.proto` and 
`google/protobuf/timestamp.proto` (well-known types bundled with 
`protobuf-java`), plus self-references. No additional proto dependencies needed.
   - Build time impact: ~4.6s for proto compilation on a local machine.
   - PR #1237 is currently blocked on this.


-- 
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