Git-Yang commented on issue #3294: URL: https://github.com/apache/rocketmq/issues/3294#issuecomment-907539404
> > ClientIp is dynamically acquired at startup. Static variables are generally used to save constants determined during compilation. Static variables are not suitable. > > Obtaining ip information locally does not go through the network, and generally does not take a long time. You can locate the specific time-consuming time. > > Thanks for your help. > There is 100+ consumes in my one service.All register completed cost more then 40 sconds.If i disable Disable some network adapters like wlan, it will Halve the time spent,but i think it still too slow。 > Also,clientIp in all consumes is same(I don't use clusters or anything like that),so I think this field meybe static, only query once when class has been loaded. > Or meybe provide one way when in this environment that can set use NetworkInterface.getNetworkInterfaces method only once? > Thank you. The clientIP will be obtained only when the clientInstance is started for the first time. Do the 100+ consumptions you mentioned use the same clientInstance? -- 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]
