WuShang-3306 opened a new issue #3294:
URL: https://github.com/apache/rocketmq/issues/3294
The field clientIP in ClientConfig.class maybe static?
The problem is that how much consumer service has, it is need to register
same number of times.
And I alse use windows dev environment, this make me
worried。NetworkInterface.getNetworkInterfaces method cost too much time, and it
need cost coumser nums multiply method cost times, this make my application
start too slow.
So, I think the filed The field clientIP in ClientConfig.class maybe
static?Or it has other uses?But I only konw little of it.
Can someone tell me?
ClientConfig.class 中的 clientIP 字段或许应该是static的?
目前我使用windows作为本地的开发环境,NetworkInterface.getNetworkInterfaces方法每获取一次都需要花费不少的时间,而且每有一个consumer,就会在注册的时候调用一次这方法,这将花费consumer数量X单次时间
的巨长的时间,甚至在我启用懒加载的时候超出了服务启动完成的时间。
所以我想ClientConfig.class中的字段是否可能是static的?可能这个字段还有其他的用途?我对它了解太少了。
有人能告诉我吗?
>`public class ClientConfig {
public static final String SEND_MESSAGE_WITH_VIP_CHANNEL_PROPERTY =
"com.rocketmq.sendMessageWithVIPChannel";
private String namesrvAddr =
NameServerAddressUtils.getNameServerAddresses();
private String clientIP = RemotingUtil.getLocalAddress();
private String instanceName = System.getProperty("rocketmq.client.name",
"DEFAULT");
private int clientCallbackExecutorThreads =
Runtime.getRuntime().availableProcessors();
protected String namespace;
protected AccessChannel accessChannel = AccessChannel.LOCAL;
`
--
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]