mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-21 05:44:03 +08:00
Merge pull request #4225 from drpmma/feature/grpc-develop-v2
[ISSUE #3949] Support gRPC protocol
This commit is contained in:
@@ -38,9 +38,6 @@ public class NettyClientConfig {
|
||||
private boolean clientPooledByteBufAllocatorEnable = false;
|
||||
private boolean clientCloseSocketIfTimeout = NettySystemConfig.clientCloseSocketIfTimeout;
|
||||
|
||||
private boolean preferredDirectByteBuffer = false;
|
||||
private boolean defaultEventExecutorGroupEnable = true;
|
||||
|
||||
private boolean useTLS;
|
||||
|
||||
private int writeBufferHighWaterMark = NettySystemConfig.writeBufferHighWaterMark;
|
||||
@@ -169,4 +166,11 @@ public class NettyClientConfig {
|
||||
this.disableCallbackExecutor = disableCallbackExecutor;
|
||||
}
|
||||
|
||||
public boolean isDisableNettyWorkerGroup() {
|
||||
return disableNettyWorkerGroup;
|
||||
}
|
||||
|
||||
public void setDisableNettyWorkerGroup(boolean disableNettyWorkerGroup) {
|
||||
this.disableNettyWorkerGroup = disableNettyWorkerGroup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,8 +210,8 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti
|
||||
LOGGER.warn("Connections are insecure as SSLContext is null!");
|
||||
}
|
||||
}
|
||||
pipeline.addLast(
|
||||
defaultEventExecutorGroup,
|
||||
ch.pipeline().addLast(
|
||||
nettyClientConfig.isDisableNettyWorkerGroup() ? null : defaultEventExecutorGroup,
|
||||
new NettyEncoder(),
|
||||
new NettyDecoder(),
|
||||
new IdleStateHandler(0, 0, nettyClientConfig.getClientChannelMaxIdleTimeSeconds()),
|
||||
|
||||
@@ -110,7 +110,7 @@ public class RemotingCommand {
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private static void setCmdVersion(RemotingCommand cmd) {
|
||||
protected static void setCmdVersion(RemotingCommand cmd) {
|
||||
if (configVersion >= 0) {
|
||||
cmd.setVersion(configVersion);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user