You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "xdkxlk (via GitHub)" <gi...@apache.org> on 2023/04/06 09:57:17 UTC
[GitHub] [rocketmq] xdkxlk commented on a diff in pull request #6522: [ISSUE #6513] fix(proxy): enhance ProxyContext
xdkxlk commented on code in PR #6522:
URL: https://github.com/apache/rocketmq/pull/6522#discussion_r1159543562
##########
proxy/src/main/java/org/apache/rocketmq/proxy/common/ProxyContext.java:
##########
@@ -122,4 +122,13 @@ public String getAction() {
return this.getVal(ContextVariable.ACTION);
}
+ public ProxyContext setProtocol(String protocol) {
Review Comment:
Rename to `ProtocolType` is better
##########
proxy/src/main/java/org/apache/rocketmq/proxy/common/ContextVariable.java:
##########
@@ -26,4 +26,6 @@ public class ContextVariable {
public static final String CLIENT_VERSION = "client-version";
public static final String REMAINING_MS = "remaining-ms";
public static final String ACTION = "action";
+ public static final String PROTOCOL = "protocol";
Review Comment:
Rename to `protocol-type` is better
##########
proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ClientManagerActivity.java:
##########
@@ -82,6 +83,7 @@ protected RemotingCommand heartBeat(ChannelHandlerContext ctx, RemotingCommand r
this.remotingChannelManager.createProducerChannel(ctx.channel(), data.getGroupName(), clientId),
clientId, request.getLanguage(),
request.getVersion());
+ setClientPropertiesToChannelAttr(clientChannelInfo);
Review Comment:
Why do we need to add properties to the channel attribute when we have already passed the `clientId`, `language`, and `version` to `ClientChannelInfo`?
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org