You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/04/18 14:04:55 UTC

[GitHub] [activemq-artemis] brusdev opened a new pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

brusdev opened a new pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092
 
 
   Read the CLI connector from the related broker instance if it isn't set by user.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] brusdev commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
brusdev commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410840362
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   I pushed a new commit to simplify.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] brusdev commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
brusdev commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410840362
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   I pushed a new commit to simply.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410721543
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   For instance.. there' s nothing the client CLI can do with a inVM acceptor. that's only valid for embedded cases, which is definitely not the case for the CLI.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410721374
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   why don't you do something simple?
   
   Look for broker.xml on the etc.
   
   look for the acceptor named "artemis"
   
   ```xml
   
   <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor
   
   ```
   
   
   if you can't find it, just use the DEFAULT and the user will have to be more ellaborative on the cli options.
   
   
   no reason to complicate things here IMO.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410721374
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   why don't you do something simple?
   
   Look for broker.xml on the etc.
   
   look for the acceptor named "artemis"
   
   ```xml
   
   <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor```
   
   
   if you can't find it, just use the DEFAULT and the user will have to be more ellaborative on the cli options.
   
   
   no reason to complicate things here IMO.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410721374
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   why don't you do something simple?
   
   Look for broker.xml on the etc.
   
   look for the acceptor named "artemis"
   
   ```<acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor```
   
   
   if you can't find it, just use the DEFAULT and the user will have to be more ellaborative on the cli options.
   
   
   no reason to complicate things here IMO.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on a change in pull request #3092: ARTEMIS-2723 Read the default CLI connector from the related broker
URL: https://github.com/apache/activemq-artemis/pull/3092#discussion_r410721672
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 ##########
 @@ -79,6 +95,67 @@ public void setProtocol(String protocol) {
       this.protocol = protocol;
    }
 
+   @Override
+   public Object execute(ActionContext context) throws Exception {
+      super.execute(context);
+
+      if (brokerURL == null) {
+         String brokerURLInstance = getBrokerURLInstance();
+
+         if (brokerURLInstance != null) {
+            brokerURL = brokerURLInstance;
+         } else {
+            brokerURL = DEFAULT_BROKER_URL;
+         }
+      }
+
+      System.out.println("Connection brokerURL = " + brokerURL);
+
+      return null;
+   }
+
+   private String getBrokerURLInstance() {
+      if (getBrokerInstance() != null) {
+         try {
+            File xmlFile = new File(new File(getBrokerEtc()), "bootstrap.xml");
+            String configuration = xmlFile.toURI().toString().replace("file:", "xml:").replace("\\", "/");
+            BrokerDTO brokerDTO = BrokerFactory.createBrokerConfiguration(configuration, getBrokerHome(), getBrokerInstance(), getBrokerURIInstance());
+
+            FileConfiguration fileConfiguration = new FileConfiguration();
+            String serverConfiguration = brokerDTO.server.getConfigurationURI().toASCIIString();
+            FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(serverConfiguration);
+            fileDeploymentManager.addDeployable(fileConfiguration);
+            fileDeploymentManager.readConfiguration();
+
+            for (TransportConfiguration acceptorConfiguration: fileConfiguration.getAcceptorConfigurations()) {
+               Map<String, Object> acceptorParams = acceptorConfiguration.getParams();
+               String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, acceptorParams).toUpperCase();
+
+               if (protocols == null || protocols.contains(protocol.toUpperCase())) {
+                  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 (scheme.equals(SchemaConstants.VM)) {
 
 Review comment:
   if anything failed.. like you can't find the broker.xml on the ETC.. just use the default option.
   
   That will be true for the cases where you use the CLI from the main distribution. as a matter of fact you should test the options outside of the broker instance.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services