mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
[ISSUE 3585] [Part A] eliminate reverse DNS lookup in MessageExt (#3586)
This commit is contained in:
@@ -153,6 +153,10 @@ public class MessageExt extends Message {
|
||||
|
||||
public String getBornHostNameString() {
|
||||
if (null != this.bornHost) {
|
||||
if (bornHost instanceof InetSocketAddress) {
|
||||
// without reverse dns lookup
|
||||
return ((InetSocketAddress) bornHost).getHostString();
|
||||
}
|
||||
InetAddress inetAddress = ((InetSocketAddress) this.bornHost).getAddress();
|
||||
|
||||
return null != inetAddress ? inetAddress.getHostName() : null;
|
||||
|
||||
Reference in New Issue
Block a user