Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
aec300b
feat(proxy): implement RIP-2 admin gRPC service on the proxy
zhaohai666 Aug 4, 2026
b4f1c43
refactor(proxy): depend on rocketmq-proto 2.3.0 instead of vendored v…
zhaohai666 Aug 4, 2026
6acfbe5
feat(proxy): implement RIP-2 ProxyAdminService M1 RPCs
zhaohai666 Aug 5, 2026
dd4f90e
fix dedicated admin gRPC server (control plane), isolated from the da…
zhaohai666 Aug 6, 2026
3f74b17
feat(proxy): complete RIP-2 ProxyAdminService surface per gap audit
zhaohai666 Aug 6, 2026
b8fd89e
remove submodule
zhaohai666 Aug 6, 2026
eb7a51f
fix(build): finish removing the rocketmq-apis submodule, keep proto 2…
zhaohai666 Aug 6, 2026
d7067b4
Fix signature‑algorithm calibration
zhaohai666 Aug 6, 2026
edaa1cb
refactor(proxy): rebase RIP-2 admin on rocketmq-apis main proto 2.2.0…
zhaohai666 Sep 4, 2026
4cb82b9
docs: rewrite RIP-2 docs for the rocketmq-apis main (2.2.0) contract
zhaohai666 Sep 4, 2026
988b082
fix(rip2): provide a QueueSelector for adminSendMessage
zhaohai666 Sep 7, 2026
f69ebb1
fix(rip2): migrate AdminModelConverter to fastjson2
zhaohai666 Sep 7, 2026
2e77c8e
fix(rip2): bump protobuf.version to 3.24.4 to match rocketmq-proto 2.2.0
zhaohai666 Sep 7, 2026
5fdeb26
fix(rip2): align Bazel maven_install with rocketmq-proto 2.2.0 / prot…
zhaohai666 Sep 8, 2026
9ac70c0
fix(rip2): align Bazel gRPC pins to 1.50.0 for rocketmq-proto 2.2.0
zhaohai666 Sep 8, 2026
591c8ac
build(rip2): consume proto from rocketmq-apis git submodule instead o…
zhaohai666 Sep 8, 2026
e14e119
build(rip2): generate proto from the rocketmq-apis submodule in the B…
zhaohai666 Sep 8, 2026
f1da4d7
build(rip2): fix CI for submodule-based proto generation
zhaohai666 Sep 8, 2026
6ce0ff5
build(rip2): add Apache-2.0 headers to submodule build files
zhaohai666 Sep 8, 2026
0976e85
build(rip2): declare fastjson dep for proxy Bazel tests
zhaohai666 Sep 8, 2026
6cd71ef
ci: checkout rocketmq-apis submodule for CodeQL build
zhaohai666 Sep 8, 2026
ba73d22
refactor(rip2): use fastjson2 in AdminModelConverterTest
zhaohai666 Sep 8, 2026
362a62d
ci: replace CodeQL autobuild with explicit Maven build, bump to v3
zhaohai666 Sep 8, 2026
fe2252e
fix(rip2): compile rocketmq-proto under JDK 9+ for CodeQL build
zhaohai666 Sep 8, 2026
f68673d
fix(test): stabilize OffsetResetIT inflight assertion
zhaohai666 Sep 8, 2026
9274261
docs(rip2): drop working copies, document submodule-based proto build
zhaohai666 Sep 8, 2026
32b5538
test(rip2): raise proxy admin patch coverage
zhaohai666 Sep 8, 2026
2509753
feat(proxy): implement the Proxy Admin gRPC surface
lizhimins Sep 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

rocketmq-apis
2 changes: 2 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache Bazel repository
uses: actions/cache@v4
with:
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/codeql_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Cache Maven packages
uses: actions/cache@v3
with:
Expand All @@ -26,11 +28,19 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
# Initializes the CodeQL tools for scanning.
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "corretto"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: java
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Explicit build instead of autobuild: rocketmq-proto is generated from
# the rocketmq-apis submodule at compile time, which autobuild cannot
# handle reliably.
- name: Build with Maven
run: mvn -B compile -DskipTests -Dmaven.javadoc.skip=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: true
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:

- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
Expand Down
21 changes: 21 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[submodule "rocketmq-apis"]
path = rocketmq-apis
url = https://github.com/apache/rocketmq-apis.git
branch = main
88 changes: 77 additions & 11 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")

RULES_JVM_EXTERNAL_TAG = "4.2"

Expand Down Expand Up @@ -71,9 +71,9 @@ maven_install(
"org.bouncycastle:bcpkix-jdk18on:1.83",
"com.google.code.gson:gson:2.9.0",
"com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2",
"org.apache.rocketmq:rocketmq-proto:2.1.2",
"com.google.protobuf:protobuf-java:3.20.1",
"com.google.protobuf:protobuf-java-util:3.20.1",
"com.google.protobuf:protobuf-java:3.24.4",
"com.google.protobuf:protobuf-java-util:3.24.4",
"javax.annotation:javax.annotation-api:1.3.2",
"com.conversantmedia:disruptor:1.2.10",
"org.apache.tomcat:annotations-api:6.0.53",
"com.google.code.findbugs:jsr305:3.0.2",
Expand All @@ -82,13 +82,13 @@ maven_install(
"org.openjdk.jmh:jmh-core:1.19",
"org.openjdk.jmh:jmh-generator-annprocess:1.19",
"com.github.ben-manes.caffeine:caffeine:2.9.3",
"io.grpc:grpc-services:1.47.0",
"io.grpc:grpc-netty-shaded:1.47.0",
"io.grpc:grpc-context:1.47.0",
"io.grpc:grpc-stub:1.47.0",
"io.grpc:grpc-api:1.47.0",
"io.grpc:grpc-protobuf:1.47.0",
"io.grpc:grpc-testing:1.47.0",
"io.grpc:grpc-services:1.50.0",
"io.grpc:grpc-netty-shaded:1.50.0",
"io.grpc:grpc-context:1.50.0",
"io.grpc:grpc-stub:1.50.0",
"io.grpc:grpc-api:1.50.0",
"io.grpc:grpc-protobuf:1.50.0",
"io.grpc:grpc-testing:1.50.0",
"org.springframework:spring-core:5.3.27",
"io.opentelemetry:opentelemetry-exporter-otlp:1.47.0",
"io.opentelemetry:opentelemetry-exporter-prometheus:1.47.0-alpha",
Expand Down Expand Up @@ -125,6 +125,72 @@ maven_install(
],
)

# Well-known type protos (google/protobuf/{timestamp,duration}.proto). The
# standalone protoc executable does not bundle them, so they have to be placed on
# the include path explicitly.
http_archive(
name = "com_google_protobuf_wkt",
build_file_content = """
filegroup(
name = "wkt_protos",
srcs = glob(["*.proto"]),
visibility = ["//visibility:public"],
)
""",
sha256 = "616bb3536ac1fff3fb1a141450fa28b875e985712170ea7f1bfe5e5fc41e2cd8",
strip_prefix = "protobuf-24.4/src/google/protobuf",
urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v24.4.tar.gz"],
)

# protoc / grpc codegen binaries. rules_jvm_external can only resolve jar
# artifacts, so the prebuilt executables are fetched directly. Using prebuilt
# binaries avoids the grpc-java Bazel toolchain, which would build protoc and
# the grpc plugin from C++ sources.
http_file(
name = "com_google_protobuf_protoc_linux_x86_64",
downloaded_file_path = "protoc",
executable = True,
sha256 = "59a70515db36977cf29ab09323b469dca51dd6572a5e08a731d741f22eef2b6c",
urls = ["https://repo1.maven.org/maven2/com/google/protobuf/protoc/3.24.4/protoc-3.24.4-linux-x86_64.exe"],
)

http_file(
name = "com_google_protobuf_protoc_osx_x86_64",
downloaded_file_path = "protoc",
executable = True,
sha256 = "8689519587d41b7af9e3b3f2e8c3d1335a23315857d157f61c26c10a1c61a9fa",
urls = ["https://repo1.maven.org/maven2/com/google/protobuf/protoc/3.24.4/protoc-3.24.4-osx-x86_64.exe"],
)

http_file(
name = "io_grpc_protoc_gen_grpc_java_linux_x86_64",
downloaded_file_path = "protoc-gen-grpc-java",
executable = True,
sha256 = "52dcbe738d3c920d7744780c67417309fe4ed990b380e9d1cf073c0654656191",
urls = ["https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.53.0/protoc-gen-grpc-java-1.53.0-linux-x86_64.exe"],
)

http_file(
name = "io_grpc_protoc_gen_grpc_java_osx_x86_64",
downloaded_file_path = "protoc-gen-grpc-java",
executable = True,
sha256 = "97da9c1a408fb23391853273272a9c04f1b8ba6a2ce3c18ff95eab9cc91f0388",
urls = ["https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.53.0/protoc-gen-grpc-java-1.53.0-osx-x86_64.exe"],
)

# The rocketmq-apis git submodule (apache main), which supplies
# apache/rocketmq/v2/*.proto including the admin.proto.
#
# The submodule ships its own BUILD files, but they pull in toolchains this
# workspace does not declare (graknlabs_bazel_distribution, googleapis), so the
# directory is listed in .bazelignore (keeps `bazel build //...` from trying to
# build it) and is surfaced here through a minimal build file instead.
new_local_repository(
name = "rocketmq_apis",
build_file = "//bazel:rocketmq_apis.BUILD",
path = "rocketmq-apis",
)

http_archive(
name = "io_buildbuddy_buildbuddy_toolchain",
sha256 = "b12273608db627eb14051eb75f8a2134590172cd69392086d392e25f3954ea6e",
Expand Down
4 changes: 2 additions & 2 deletions auth/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ java_library(
"@maven//:org_apache_commons_commons_lang3",
"@maven//:commons_collections_commons_collections",
"@maven//:com_alibaba_fastjson2_fastjson2",
"@maven//:org_apache_rocketmq_rocketmq_proto",
"//rocketmq-proto:rocketmq-proto",
"@maven//:org_slf4j_slf4j_api",
"@maven//:com_github_ben_manes_caffeine_caffeine",
"@maven//:io_grpc_grpc_api",
Expand All @@ -55,7 +55,7 @@ java_library(
"@maven//:org_apache_commons_commons_lang3",
"@maven//:commons_collections_commons_collections",
"@maven//:com_alibaba_fastjson2_fastjson2",
"@maven//:org_apache_rocketmq_rocketmq_proto",
"//rocketmq-proto:rocketmq-proto",
"@maven//:org_slf4j_slf4j_api",
"@maven//:com_github_ben_manes_caffeine_caffeine",
"@maven//:io_grpc_grpc_api",
Expand Down
33 changes: 33 additions & 0 deletions bazel/rocketmq_apis.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Build file for the rocketmq-apis git submodule.
#
# The submodule ships its own BUILD files (root + java/ + cpp/), but those pull
# in toolchains this workspace does not declare (graknlabs_bazel_distribution,
# googleapis). Rather than dragging all of that in, the directory is listed in
# .bazelignore (so `bazel build //...` never tries to build it) and is exposed to
# this workspace as the external repository @rocketmq_apis through a minimal
# build file instead.
#
# The proto set is a glob over the whole v2 directory, so admin.proto is
# included alongside definition.proto and service.proto.
filegroup(
name = "v2_protos",
srcs = glob(["apache/rocketmq/v2/*.proto"]),
visibility = ["//visibility:public"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ public class GrpcConstants {

public static final Metadata.Key<String> CHANNEL_ID
= Metadata.Key.of("x-mq-channel-id", Metadata.ASCII_STRING_MARSHALLER);

/**
* Loop-prevention marker for proxy admin RPCs: set to {@code "true"} by a proxy that forwards
* an admin call to the peer proxy owning the target client, so the peer never forwards it
* again.
*/
public static final Metadata.Key<String> ADMIN_FORWARDED
= Metadata.Key.of("x-mq-admin-forwarded", Metadata.ASCII_STRING_MARSHALLER);
}
Loading
Loading