clebertsuconic commented on code in PR #4539:
URL: https://github.com/apache/activemq-artemis/pull/4539#discussion_r1256001508
##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java:
##########
@@ -113,7 +115,23 @@ public String getBrokerURLInstance(String acceptor) {
return new URI(scheme, null, host, port, null, null,
null).toString();
}
}
+
+ for (TransportConfiguration connectorConfiguration:
brokerConfiguration.getConnectorConfigurations().values()) {
+ if (connectorConfiguration.getName().equals(acceptor)) {
+ Map<String, Object> acceptorParams =
connectorConfiguration.getParams();
+ String scheme =
ConfigurationHelper.getStringProperty(TransportConstants.SCHEME_PROP_NAME,
SchemaConstants.TCP, acceptorParams);
+ String host =
ConfigurationHelper.getStringProperty(TransportConstants.HOST_PROP_NAME,
"localhost", acceptorParams);
+ int port =
ConfigurationHelper.getIntProperty(TransportConstants.PORT_PROP_NAME, 61616,
acceptorParams);
+
+ if (InetAddress.getByName(host).isAnyLocalAddress()) {
+ host = "localhost";
+ }
+
+ return new URI(scheme, null, host, port, null, null,
null).toString();
+ }
+ }
} catch (Exception e) {
+ e.printStackTrace();
Review Comment:
I will actually keep the e.printStackTrace with your suggestion.
--
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]