ARTEMIS-833 maxHops defaults to 0 when creating artemis cluster configuration 
through cli

https://issues.apache.org/jira/browse/ARTEMIS-833

The generated broker.xml configuration file has the <max-hops/> element
set to 0. This is very confusing since it effectively disables message
load balancing and stop cluster from forwarding messages to other nodes
in hte cluster. This should be set to at least 1.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3de65682
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3de65682
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3de65682

Branch: refs/heads/master
Commit: 3de65682cecfaf2f37ae41cd709d983cd0418c3c
Parents: bec6c0b
Author: Tom Ross <[email protected]>
Authored: Wed Nov 2 08:47:16 2016 +0000
Committer: Clebert Suconic <[email protected]>
Committed: Wed Nov 2 14:15:52 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/activemq/artemis/cli/commands/Create.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3de65682/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
----------------------------------------------------------------------
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 62de0ef..ecb9e49 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -136,7 +136,7 @@ public class Create extends InputAbstract {
    boolean clustered = false;
 
    @Option(name = "--max-hops", description = "Number of hops on the cluster 
configuration")
-   int maxHops = 0;
+   int maxHops = 1;
 
    @Option(name = "--message-load-balancing", description = "Load balancing 
policy on cluster. [ON_DEMAND (default) | STRICT | OFF]")
    MessageLoadBalancingType messageLoadBalancing = 
MessageLoadBalancingType.ON_DEMAND;

Reply via email to