You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by an...@apache.org on 2015/05/21 12:04:13 UTC
[5/6] activemq-artemis git commit: Fixing cluster-settings
Fixing cluster-settings
I have been playing with settings on the examples and the cluster settings are not really working by default
The default cluster-settings is using the wrong acceptor and the lack of max-hops is not making it work on most examples
maybe I will add some configuration on the max-hops through the create interface. I will set it as 0 for now at least
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/304e7186
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/304e7186
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/304e7186
Branch: refs/heads/master
Commit: 304e71862f216380fd336aaa5af97b6d294ced0e
Parents: 5e17408
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed May 20 20:19:07 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed May 20 23:17:09 2015 -0400
----------------------------------------------------------------------
.../activemq/artemis/cli/commands/Create.java | 17 +++++++++++++++--
.../artemis/cli/commands/etc/cluster-settings.txt | 4 +++-
2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/304e7186/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 ca36024..bfffa32 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
@@ -103,6 +103,9 @@ public class Create extends InputAbstract
@Option(name = "--clustered", description = "Enable clustering")
boolean clustered = false;
+ @Option(name = "--max-hops", description = "Number of hops on the cluster configuration")
+ int maxHops = 0;
+
@Option(name = "--replicated", description = "Enable broker replication")
boolean replicated = false;
@@ -140,6 +143,16 @@ public class Create extends InputAbstract
boolean IS_CYGWIN;
+ public int getMaxHops()
+ {
+ return maxHops;
+ }
+
+ public void setMaxHops(int maxHops)
+ {
+ this.maxHops = maxHops;
+ }
+
public boolean isNoWeb()
{
return noWeb;
@@ -434,7 +447,7 @@ public class Create extends InputAbstract
filters.put("${hq.port}", String.valueOf(HQ_PORT + portOffset));
filters.put("${http.port}", String.valueOf(HTTP_PORT + portOffset));
filters.put("${data.dir}", data);
-
+ filters.put("${max-hops}", String.valueOf(maxHops));
filters.put("${user}", getUser());
filters.put("${password}", getPassword());
filters.put("${role}", getRole());
@@ -448,7 +461,7 @@ public class Create extends InputAbstract
filters.put("${connector-config.settings}", connectorSettings);
filters.put("${cluster-security.settings}", readTextFile(ETC_CLUSTER_SECURITY_SETTINGS_TXT));
- filters.put("${cluster.settings}", readTextFile(ETC_CLUSTER_SETTINGS_TXT));
+ filters.put("${cluster.settings}", applyFilters(readTextFile(ETC_CLUSTER_SETTINGS_TXT), filters));
filters.put("${cluster-user}", getClusterUser());
filters.put("${cluster-password}", getClusterPassword());
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/304e7186/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/cluster-settings.txt
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/cluster-settings.txt b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/cluster-settings.txt
index 18460ed..2b9c48e 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/cluster-settings.txt
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/cluster-settings.txt
@@ -19,7 +19,9 @@
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
- <connector-ref>activemq</connector-ref>
+ <connector-ref>artemis</connector-ref>
+ <max-hops>${max-hops}</max-hops>
<discovery-group-ref discovery-group-name="dg-group1"/>
</cluster-connection>
</cluster-connections>
+