This is an automated email from the ASF dual-hosted git repository.

aaronai pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 12ea1a735 Support ChannelZ to observe gRPC server (#4664)
12ea1a735 is described below

commit 12ea1a735eb5ce9aaab6c00ad0fba44ac86f9766
Author: Zhanhui Li <lizhan...@gmail.com>
AuthorDate: Fri Jul 29 13:43:44 2022 +0800

    Support ChannelZ to observe gRPC server (#4664)
---
 proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java 
b/proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java
index fb017356a..9be0abe20 100644
--- a/proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java
+++ b/proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java
@@ -20,6 +20,8 @@ package org.apache.rocketmq.proxy;
 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.classic.joran.JoranConfigurator;
 import ch.qos.logback.core.joran.spi.JoranException;
+import io.grpc.protobuf.services.ChannelzService;
+import io.grpc.protobuf.services.ProtoReflectionService;
 import java.util.Date;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -70,6 +72,8 @@ public class ProxyStartup {
             // create grpcServer
             GrpcServer grpcServer = GrpcServerBuilder.newBuilder(executor, 
ConfigurationManager.getProxyConfig().getGrpcServerPort())
                 .addService(createServiceProcessor(messagingProcessor))
+                .addService(ChannelzService.newInstance(100))
+                .addService(ProtoReflectionService.newInstance())
                 .configInterceptor()
                 .build();
             PROXY_START_AND_SHUTDOWN.appendStartAndShutdown(grpcServer);

Reply via email to