activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [5/6] activemq-artemis git commit: ARTEMIS-19 allow disabling of message load-balancing
Date Wed, 03 Jun 2015 23:30:21 GMT
ARTEMIS-19 allow disabling of message load-balancing


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

Branch: refs/heads/master
Commit: 20326d0d83a8bae659f3e6c8e2f39c052e8dd104
Parents: 43470f3
Author: jbertram <jbertram@apache.org>
Authored: Fri May 29 16:55:32 2015 -0500
Committer: jbertram <jbertram@apache.org>
Committed: Wed Jun 3 16:21:43 2015 -0500

----------------------------------------------------------------------
 .../config/ActiveMQDefaultConfiguration.java    |  13 +-
 .../management/ClusterConnectionControl.java    |   2 +-
 .../config/ClusterConnectionConfiguration.java  |  24 +--
 .../artemis/core/config/impl/Validators.java    |  17 +-
 .../deployers/impl/FileConfigurationParser.java |  51 ++++--
 .../impl/ClusterConnectionControlImpl.java      |   4 +-
 .../artemis/core/postoffice/Bindings.java       |   3 +-
 .../core/postoffice/impl/BindingsImpl.java      |  18 +-
 .../core/server/ActiveMQMessageBundle.java      |   3 +
 .../core/server/cluster/ClusterManager.java     |   4 +-
 .../cluster/impl/ClusterConnectionImpl.java     |  12 +-
 .../cluster/impl/MessageLoadBalancingType.java  |  34 ++++
 .../resources/schema/artemis-configuration.xsd  |  18 +-
 .../core/config/impl/FileConfigurationTest.java |   5 +-
 .../artemis/tests/util/ActiveMQTestBase.java    |   3 +-
 .../resources/ConfigurationTest-full-config.xml | 112 ++++++------
 .../resources/InvalidConfigurationTest0.xml     | 166 +++++++++---------
 .../resources/InvalidConfigurationTest1.xml     | 166 +++++++++---------
 .../resources/InvalidConfigurationTest2.xml     | 166 +++++++++---------
 .../resources/InvalidConfigurationTest3.xml     | 164 +++++++++---------
 .../resources/InvalidConfigurationTest4.xml     | 164 +++++++++---------
 .../resources/InvalidConfigurationTest5.xml     | 170 +++++++++----------
 docs/user-manual/en/clusters.md                 |  49 +++---
 docs/user-manual/en/configuration-index.md      |   2 +-
 .../clustered-durable-subscription/readme.html  |  44 ++---
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 examples/jms/clustered-grouping/readme.html     |   8 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server2/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 examples/jms/clustered-queue/readme.html        |  30 ++--
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server2/broker.xml  |   2 +-
 .../jms/clustered-static-discovery/readme.html  |  30 ++--
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server2/broker.xml  |   2 +-
 .../main/resources/activemq/server3/broker.xml  |   2 +-
 .../jms/clustered-static-oneway/readme.html     |  24 +--
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server2/broker.xml  |   2 +-
 examples/jms/clustered-topic/readme.html        |  30 ++--
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 examples/jms/symmetric-cluster/readme.html      |  30 ++--
 .../main/resources/activemq/server0/broker.xml  |   2 +-
 .../main/resources/activemq/server1/broker.xml  |   2 +-
 .../main/resources/activemq/server2/broker.xml  |   2 +-
 .../main/resources/activemq/server3/broker.xml  |   2 +-
 .../main/resources/activemq/server4/broker.xml  |   2 +-
 .../main/resources/activemq/server5/broker.xml  |   2 +-
 .../extras/byteman/ClusteredGroupingTest.java   |  25 +--
 .../extras/byteman/ScaleDownFailoverTest.java   |   7 +-
 .../extras/byteman/ScaleDownFailureTest.java    |   5 +-
 .../cluster/ClusterControllerTest.java          |   5 +-
 .../distribution/ClusterHeadersRemovedTest.java |   5 +-
 .../cluster/distribution/ClusterTestBase.java   |  29 ++--
 .../distribution/ClusterWithBackupTest.java     |  17 +-
 .../distribution/ClusteredGroupingTest.java     | 121 ++++++-------
 .../ClusteredRequestResponseTest.java           |  15 +-
 .../distribution/MessageLoadBalancingTest.java  | 128 ++++++++++++++
 .../distribution/MessageRedistributionTest.java |  47 ++---
 .../MessageRedistributionWithDiscoveryTest.java |  15 +-
 .../distribution/OneWayChainClusterTest.java    |  91 +++++-----
 .../distribution/OnewayTwoNodeClusterTest.java  |  25 +--
 .../SimpleSymmetricClusterTest.java             |  45 ++---
 .../distribution/SymmetricClusterTest.java      |  39 ++---
 .../SymmetricClusterWithBackupTest.java         |  23 +--
 .../SymmetricClusterWithDiscoveryTest.java      |  15 +-
 .../distribution/TemporaryQueueClusterTest.java |   9 +-
 .../distribution/TwoWayTwoNodeClusterTest.java  |   5 +-
 .../TwoWayTwoNodeClusterWithDiscoveryTest.java  |   6 +-
 .../ClusterWithBackupFailoverTestBase.java      |   5 +-
 .../DiscoveryClusterWithBackupFailoverTest.java |  16 +-
 .../failover/GroupingFailoverTestBase.java      |  13 +-
 .../failover/ReplicatedDistributionTest.java    |   7 +-
 .../StaticClusterWithBackupFailoverTest.java    |  16 +-
 .../ha/HAAutomaticBackupSharedStore.java        |   7 +-
 .../cluster/restart/ClusterRestartTest.java     |   9 +-
 .../cluster/topology/HAClientTopologyTest.java  |  15 +-
 .../HAClientTopologyWithDiscoveryTest.java      |  15 +-
 .../cluster/topology/IsolatedTopologyTest.java  |   5 +
 .../cluster/topology/NonHATopologyTest.java     |   2 +
 .../cluster/util/MultiServerTestBase.java       |   3 +
 .../ClusterConnectionControl2Test.java          |   3 +-
 .../ClusterConnectionControlTest.java           |  15 +-
 .../ClusterConnectionControlUsingCoreTest.java  |   4 +-
 .../paging/SpawnedServerSupport.java            |   3 +-
 .../integration/server/ScaleDown3NodeTest.java  |   7 +-
 .../tests/integration/server/ScaleDownTest.java |   5 +-
 .../tests/util/JMSClusteredTestBase.java        |   9 +-
 .../impl/WildcardAddressManagerUnitTest.java    |   3 +-
 109 files changed, 1389 insertions(+), 1090 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index 720a516..5752a5b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -339,9 +339,11 @@ public final class ActiveMQDefaultConfiguration
    // should duplicate detection headers be inserted in forwarded messages?
    private static boolean DEFAULT_CLUSTER_DUPLICATE_DETECTION = true;
 
-   // should messages be load balanced if there are no matching consumers on target?
    private static boolean DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS = false;
 
+   // how should messages be load balanced?
+   private static String DEFAULT_CLUSTER_MESSAGE_LOAD_BALANCING_TYPE = "ON_DEMAND";
+
    // maximum number of hops cluster topology is propagated
    private static int DEFAULT_CLUSTER_MAX_HOPS = 1;
 
@@ -950,12 +952,17 @@ public final class ActiveMQDefaultConfiguration
       return DEFAULT_CLUSTER_DUPLICATE_DETECTION;
    }
 
+   public static boolean isDefaultClusterForwardWhenNoConsumers()
+   {
+      return DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS;
+   }
+
    /**
     * should messages be load balanced if there are no matching consumers on target?
     */
-   public static boolean isDefaultClusterForwardWhenNoConsumers()
+   public static String getDefaultClusterMessageLoadBalancingType()
    {
-      return DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS;
+      return DEFAULT_CLUSTER_MESSAGE_LOAD_BALANCING_TYPE;
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ClusterConnectionControl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ClusterConnectionControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ClusterConnectionControl.java
index aaf7e0b..5767bf6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ClusterConnectionControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ClusterConnectionControl.java
@@ -46,7 +46,7 @@ public interface ClusterConnectionControl extends ActiveMQComponentControl
    /**
     * Return whether this cluster connection forward messages when it has no local consumers.
     */
-   boolean isForwardWhenNoConsumers();
+   String getMessageLoadBalancingType();
 
    /**
     * Return the Topology that this Cluster Connection knows about

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
index 01c46eb..ccb3e7c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
@@ -16,13 +16,14 @@
  */
 package org.apache.activemq.artemis.core.config;
 
+import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
+
 import java.io.Serializable;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
-
 public final class ClusterConnectionConfiguration implements Serializable
 {
    private static final long serialVersionUID = 8948303813427795935L;
@@ -53,7 +54,7 @@ public final class ClusterConnectionConfiguration implements Serializable
 
    private boolean duplicateDetection = ActiveMQDefaultConfiguration.isDefaultClusterDuplicateDetection();
 
-   private boolean forwardWhenNoConsumers = ActiveMQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers();
+   private MessageLoadBalancingType messageLoadBalancingType = Enum.valueOf(MessageLoadBalancingType.class, ActiveMQDefaultConfiguration.getDefaultClusterMessageLoadBalancingType());
 
    private List<String> staticConnectors = Collections.emptyList();
 
@@ -171,9 +172,9 @@ public final class ClusterConnectionConfiguration implements Serializable
       return duplicateDetection;
    }
 
-   public boolean isForwardWhenNoConsumers()
+   public MessageLoadBalancingType getMessageLoadBalancingType()
    {
-      return forwardWhenNoConsumers;
+      return messageLoadBalancingType;
    }
 
    public int getMaxHops()
@@ -345,11 +346,12 @@ public final class ClusterConnectionConfiguration implements Serializable
    }
 
    /**
-    * @param forwardWhenNoConsumers the forwardWhenNoConsumers to set
+    * @param messageLoadBalancingType
+    * @return
     */
-   public ClusterConnectionConfiguration setForwardWhenNoConsumers(boolean forwardWhenNoConsumers)
+   public ClusterConnectionConfiguration setMessageLoadBalancingType(MessageLoadBalancingType messageLoadBalancingType)
    {
-      this.forwardWhenNoConsumers = forwardWhenNoConsumers;
+      this.messageLoadBalancingType = messageLoadBalancingType;
       return this;
    }
 
@@ -395,7 +397,7 @@ public final class ClusterConnectionConfiguration implements Serializable
       result = prime * result + ((connectorName == null) ? 0 : connectorName.hashCode());
       result = prime * result + ((discoveryGroupName == null) ? 0 : discoveryGroupName.hashCode());
       result = prime * result + (duplicateDetection ? 1231 : 1237);
-      result = prime * result + (forwardWhenNoConsumers ? 1231 : 1237);
+      result = prime * result + (messageLoadBalancingType == null ? 0 : messageLoadBalancingType.hashCode());
       result = prime * result + maxHops;
       result = prime * result + (int)(maxRetryInterval ^ (maxRetryInterval >>> 32));
       result = prime * result + minLargeMessageSize;
@@ -459,7 +461,7 @@ public final class ClusterConnectionConfiguration implements Serializable
          return false;
       if (duplicateDetection != other.duplicateDetection)
          return false;
-      if (forwardWhenNoConsumers != other.forwardWhenNoConsumers)
+      if (messageLoadBalancingType != other.messageLoadBalancingType)
          return false;
       if (maxHops != other.maxHops)
          return false;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java
index e24d9dc..97c2d4b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java
@@ -18,6 +18,7 @@ package org.apache.activemq.artemis.core.config.impl;
 
 import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
 import org.apache.activemq.artemis.core.server.JournalType;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
 import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy;
 
@@ -176,10 +177,24 @@ public final class Validators
       {
          String val = (String) value;
          if (val == null || !val.equals(SlowConsumerPolicy.KILL.toString()) &&
-            !val.equals(SlowConsumerPolicy.NOTIFY.toString()))
+                 !val.equals(SlowConsumerPolicy.NOTIFY.toString()))
          {
             throw ActiveMQMessageBundle.BUNDLE.invalidSlowConsumerPolicyType(val);
          }
       }
    };
+
+   public static final Validator MESSAGE_LOAD_BALANCING_TYPE = new Validator()
+   {
+      public void validate(final String name, final Object value)
+      {
+         String val = (String) value;
+         if (val == null || !val.equals(MessageLoadBalancingType.OFF.toString()) &&
+                 !val.equals(MessageLoadBalancingType.STRICT.toString()) &&
+                 !val.equals(MessageLoadBalancingType.ON_DEMAND.toString()))
+         {
+            throw ActiveMQMessageBundle.BUNDLE.invalidMessageLoadBalancingType(val);
+         }
+      }
+   };
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index 44da6b5..3d68b19 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -16,16 +16,6 @@
  */
 package org.apache.activemq.artemis.core.deployers.impl;
 
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.BroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
@@ -56,6 +46,7 @@ import org.apache.activemq.artemis.core.journal.impl.JournalConstants;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
 import org.apache.activemq.artemis.core.server.JournalType;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.server.group.impl.GroupingHandlerConfiguration;
 import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
@@ -73,6 +64,16 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * Parses an XML document according to the {@literal artemis-configuration.xsd} schema.
  */
@@ -1159,7 +1160,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
       configuration.setClusterName(getString(policyNode, "cluster-name", configuration.getClusterName(), Validators.NO_CHECK));
 
       configuration.setMaxSavedReplicatedJournalsSize(getInteger(policyNode, "max-saved-replicated-journals-size",
-            configuration.getMaxSavedReplicatedJournalsSize(), Validators.MINUS_ONE_OR_GE_ZERO));
+                                                                 configuration.getMaxSavedReplicatedJournalsSize(), Validators.MINUS_ONE_OR_GE_ZERO));
 
       configuration.setScaleDownConfiguration(parseScaleDownConfig(policyNode));
 
@@ -1430,9 +1431,29 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
       boolean duplicateDetection =
          getBoolean(e, "use-duplicate-detection", ActiveMQDefaultConfiguration.isDefaultClusterDuplicateDetection());
 
-      boolean forwardWhenNoConsumers =
-         getBoolean(e, "forward-when-no-consumers",
-                    ActiveMQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers());
+      MessageLoadBalancingType messageLoadBalancingType;
+
+      if (parameterExists(e, "forward-when-no-consumers"))
+      {
+         boolean forwardWhenNoConsumers = getBoolean(e, "forward-when-no-consumers",
+                                                     ActiveMQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers());
+         if (forwardWhenNoConsumers)
+         {
+            messageLoadBalancingType = MessageLoadBalancingType.STRICT;
+         }
+         else
+         {
+            messageLoadBalancingType = MessageLoadBalancingType.ON_DEMAND;
+         }
+      }
+      else
+      {
+
+         messageLoadBalancingType = Enum.valueOf(MessageLoadBalancingType.class,
+                                                 getString(e, "message-load-balancing",
+                                                           ActiveMQDefaultConfiguration.getDefaultClusterMessageLoadBalancingType(),
+                                                           Validators.MESSAGE_LOAD_BALANCING_TYPE));
+      }
 
       int maxHops = getInteger(e, "max-hops",
                                ActiveMQDefaultConfiguration.getDefaultClusterMaxHops(),
@@ -1519,7 +1540,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
          .setCallTimeout(callTimeout)
          .setCallFailoverTimeout(callFailoverTimeout)
          .setDuplicateDetection(duplicateDetection)
-         .setForwardWhenNoConsumers(forwardWhenNoConsumers)
+         .setMessageLoadBalancingType(messageLoadBalancingType)
          .setMaxHops(maxHops)
          .setConfirmationWindowSize(confirmationWindowSize)
          .setAllowDirectConnectionsOnly(allowDirectConnectionsOnly)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java
index 48ec90f..e08474c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java
@@ -194,12 +194,12 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
       }
    }
 
-   public boolean isForwardWhenNoConsumers()
+   public String getMessageLoadBalancingType()
    {
       clearIO();
       try
       {
-         return configuration.isForwardWhenNoConsumers();
+         return configuration.getMessageLoadBalancingType().getType();
       }
       finally
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/Bindings.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/Bindings.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/Bindings.java
index febc06d..1f6613c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/Bindings.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/Bindings.java
@@ -21,6 +21,7 @@ import java.util.Collection;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.RoutingContext;
 import org.apache.activemq.artemis.core.server.ServerMessage;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.server.group.UnproposalListener;
 
 public interface Bindings extends UnproposalListener
@@ -31,7 +32,7 @@ public interface Bindings extends UnproposalListener
 
    void removeBinding(Binding binding);
 
-   void setRouteWhenNoConsumers(boolean takePriorityIntoAccount);
+   void setMessageLoadBalancingType(MessageLoadBalancingType messageLoadBalancingType);
 
    boolean redistribute(ServerMessage message, Queue originatingQueue, RoutingContext context) throws Exception;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java
index 268c198..9d3d2bc 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java
@@ -39,6 +39,7 @@ import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.RoutingContext;
 import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.core.server.cluster.RemoteQueueBinding;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.server.group.GroupingHandler;
 import org.apache.activemq.artemis.core.server.group.impl.Proposal;
 import org.apache.activemq.artemis.core.server.group.impl.Response;
@@ -58,7 +59,7 @@ public final class BindingsImpl implements Bindings
 
    private final List<Binding> exclusiveBindings = new CopyOnWriteArrayList<Binding>();
 
-   private volatile boolean routeWhenNoConsumers;
+   private volatile MessageLoadBalancingType messageLoadBalancingType = MessageLoadBalancingType.OFF;
 
    private final GroupingHandler groupingHandler;
 
@@ -73,9 +74,9 @@ public final class BindingsImpl implements Bindings
       this.name = name;
    }
 
-   public void setRouteWhenNoConsumers(final boolean routeWhenNoConsumers)
+   public void setMessageLoadBalancingType(final MessageLoadBalancingType messageLoadBalancingType)
    {
-      this.routeWhenNoConsumers = routeWhenNoConsumers;
+      this.messageLoadBalancingType = messageLoadBalancingType;
    }
 
    public Collection<Binding> getBindings()
@@ -164,7 +165,7 @@ public final class BindingsImpl implements Bindings
 
    public boolean redistribute(final ServerMessage message, final Queue originatingQueue, final RoutingContext context) throws Exception
    {
-      if (routeWhenNoConsumers)
+      if (messageLoadBalancingType.equals(MessageLoadBalancingType.STRICT) || messageLoadBalancingType.equals(MessageLoadBalancingType.OFF))
       {
          return false;
       }
@@ -409,7 +410,7 @@ public final class BindingsImpl implements Bindings
          {
             // bindings.length == 1 ==> only a local queue so we don't check for matching consumers (it's an
             // unnecessary overhead)
-            if (length == 1 || (binding.isConnected() && (routeWhenNoConsumers || binding.isHighAcceptPriority(message))))
+            if (length == 1 || (binding.isConnected() && (messageLoadBalancingType.equals(MessageLoadBalancingType.STRICT) || binding.isHighAcceptPriority(message))))
             {
                theBinding = binding;
 
@@ -421,7 +422,7 @@ public final class BindingsImpl implements Bindings
             {
                //https://issues.jboss.org/browse/HORNETQ-1254 When !routeWhenNoConsumers,
                // the localQueue should always have the priority over the secondary bindings
-               if (lastLowPriorityBinding == -1 || !routeWhenNoConsumers && binding instanceof LocalQueueBinding)
+               if (lastLowPriorityBinding == -1 || messageLoadBalancingType.equals(MessageLoadBalancingType.ON_DEMAND) && binding instanceof LocalQueueBinding)
                {
                   lastLowPriorityBinding = pos;
                }
@@ -466,6 +467,11 @@ public final class BindingsImpl implements Bindings
       {
          routingNamePositions.put(routingName, pos);
       }
+
+      if (messageLoadBalancingType.equals(MessageLoadBalancingType.OFF) && theBinding instanceof RemoteQueueBinding)
+      {
+         theBinding = getNextBinding(message, routingName, bindings);
+      }
       return theBinding;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
index 87c3a8b..bc5b982 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
@@ -362,4 +362,7 @@ public interface ActiveMQMessageBundle
 
    @Message(id = 119112, value = "Cannot set MBeanServer during startup or while started")
    IllegalStateException cannotSetMBeanserver();
+
+   @Message(id = 119113, value = "Invalid message load balancing type {0}", format = Message.Format.MESSAGE_FORMAT)
+   IllegalArgumentException invalidMessageLoadBalancingType(String val);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
index 4a3c39d..51cedfe 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
@@ -733,7 +733,7 @@ public final class ClusterManager implements ActiveMQComponent
                                                        config.getCallTimeout(),
                                                        config.getCallFailoverTimeout(),
                                                        config.isDuplicateDetection(),
-                                                       config.isForwardWhenNoConsumers(),
+                                                       config.getMessageLoadBalancingType(),
                                                        config.getConfirmationWindowSize(),
                                                        executorFactory,
                                                        server,
@@ -775,7 +775,7 @@ public final class ClusterManager implements ActiveMQComponent
                                                        config.getCallTimeout(),
                                                        config.getCallFailoverTimeout(),
                                                        config.isDuplicateDetection(),
-                                                       config.isForwardWhenNoConsumers(),
+                                                       config.getMessageLoadBalancingType(),
                                                        config.getConfirmationWindowSize(),
                                                        executorFactory,
                                                        server,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
index 02e4327..9caf330 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
@@ -109,7 +109,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
 
    private final boolean useDuplicateDetection;
 
-   private final boolean routeWhenNoConsumers;
+   private final MessageLoadBalancingType messageLoadBalancingType;
 
    private final int confirmationWindowSize;
 
@@ -177,7 +177,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
                                 final long callTimeout,
                                 final long callFailoverTimeout,
                                 final boolean useDuplicateDetection,
-                                final boolean routeWhenNoConsumers,
+                                final MessageLoadBalancingType messageLoadBalancingType,
                                 final int confirmationWindowSize,
                                 final ExecutorFactory executorFactory,
                                 final ActiveMQServer server,
@@ -216,7 +216,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
 
       this.useDuplicateDetection = useDuplicateDetection;
 
-      this.routeWhenNoConsumers = routeWhenNoConsumers;
+      this.messageLoadBalancingType = messageLoadBalancingType;
 
       this.confirmationWindowSize = confirmationWindowSize;
 
@@ -284,7 +284,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
                                 final long callTimeout,
                                 final long callFailoverTimeout,
                                 final boolean useDuplicateDetection,
-                                final boolean routeWhenNoConsumers,
+                                final MessageLoadBalancingType messageLoadBalancingType,
                                 final int confirmationWindowSize,
                                 final ExecutorFactory executorFactory,
                                 final ActiveMQServer server,
@@ -329,7 +329,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
 
       this.useDuplicateDetection = useDuplicateDetection;
 
-      this.routeWhenNoConsumers = routeWhenNoConsumers;
+      this.messageLoadBalancingType = messageLoadBalancingType;
 
       this.confirmationWindowSize = confirmationWindowSize;
 
@@ -1388,7 +1388,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
 
          Bindings theBindings = postOffice.getBindingsForAddress(queueAddress);
 
-         theBindings.setRouteWhenNoConsumers(routeWhenNoConsumers);
+         theBindings.setMessageLoadBalancingType(messageLoadBalancingType);
 
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
new file mode 100644
index 0000000..38df1a2
--- /dev/null
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server.cluster.impl;
+
+public enum MessageLoadBalancingType
+{
+   OFF("OFF"), STRICT("STRICT"), ON_DEMAND("ON_DEMAND");
+
+   private String type;
+
+   MessageLoadBalancingType(final String type)
+   {
+      this.type = type;
+   }
+
+   public String getType()
+   {
+      return type;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/main/resources/schema/artemis-configuration.xsd
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index b86b0b1..af28c09 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -1223,11 +1223,27 @@
          <xsd:element name="forward-when-no-consumers" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
             <xsd:annotation>
                <xsd:documentation>
-                  should messages be load balanced if there are no matching consumers on target?
+                  DEPRECATED: use message-load-balancing-type instead. Select STRICT to mimic foward-when-no-consumers=true
+                  and ON_DEMAND to mimic forward-when-no-consumers=false.
                </xsd:documentation>
             </xsd:annotation>
          </xsd:element>
 
+         <xsd:element name="message-load-balancing" default="ON_DEMAND" maxOccurs="1" minOccurs="0">
+            <xsd:annotation>
+               <xsd:documentation>
+                  how should messages be load balanced between servers in a cluster?
+               </xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleType>
+               <xsd:restriction base="xsd:string">
+                  <xsd:enumeration value="OFF"/>
+                  <xsd:enumeration value="STRICT"/>
+                  <xsd:enumeration value="ON_DEMAND"/>
+               </xsd:restriction>
+            </xsd:simpleType>
+         </xsd:element>
+
          <xsd:element name="max-hops" type="xsd:int" default="1" maxOccurs="1" minOccurs="0">
             <xsd:annotation>
                <xsd:documentation>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index 0b232a2..94118eb 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -39,6 +39,7 @@ import org.apache.activemq.artemis.core.config.ha.LiveOnlyPolicyConfiguration;
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.JournalType;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy;
 import org.junit.Assert;
 import org.junit.Test;
@@ -260,7 +261,7 @@ public class FileConfigurationTest extends ConfigurationImplTest
             Assert.assertEquals("queues1", ccc.getAddress());
             Assert.assertEquals(3, ccc.getRetryInterval());
             Assert.assertEquals(true, ccc.isDuplicateDetection());
-            Assert.assertEquals(false, ccc.isForwardWhenNoConsumers());
+            Assert.assertEquals(MessageLoadBalancingType.ON_DEMAND, ccc.getMessageLoadBalancingType());
             Assert.assertEquals(1, ccc.getMaxHops());
             Assert.assertEquals(123, ccc.getCallTimeout());
             Assert.assertEquals(123, ccc.getCallFailoverTimeout());
@@ -279,7 +280,7 @@ public class FileConfigurationTest extends ConfigurationImplTest
             Assert.assertEquals(456, ccc.getCallTimeout());
             Assert.assertEquals(456, ccc.getCallFailoverTimeout());
             Assert.assertEquals(false, ccc.isDuplicateDetection());
-            Assert.assertEquals(true, ccc.isForwardWhenNoConsumers());
+            Assert.assertEquals(MessageLoadBalancingType.STRICT, ccc.getMessageLoadBalancingType());
             Assert.assertEquals(2, ccc.getMaxHops());
             Assert.assertEquals(Collections.emptyList(), ccc.getStaticConnectors());
             Assert.assertEquals("dg1", ccc.getDiscoveryGroupName());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
index 69cbcda..bb03d92 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
@@ -109,6 +109,7 @@ import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.cluster.ClusterManager;
 import org.apache.activemq.artemis.core.server.cluster.RemoteQueueBinding;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.server.impl.Activation;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
@@ -525,9 +526,9 @@ public abstract class ActiveMQTestBase extends Assert
               .setConnectorName(connectorName)
               .setRetryInterval(1000)
               .setDuplicateDetection(false)
-              .setForwardWhenNoConsumers(true)
               .setMaxHops(1)
               .setConfirmationWindowSize(1)
+              .setMessageLoadBalancingType(MessageLoadBalancingType.STRICT)
               .setStaticConnectors(connectors0);
 
       return clusterConnectionConfiguration;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
index 0f81b75..0514788 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
@@ -15,9 +15,9 @@
   limitations under the License.
 -->
 <configuration
-   xmlns="urn:activemq"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/artemis-server.xsd">
+      xmlns="urn:activemq"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/artemis-server.xsd">
    <core xmlns="urn:activemq:core">
       <name>SomeNameForUseOnTheApplicationServer</name>
       <resolve-protocols>false</resolve-protocols>
@@ -65,16 +65,16 @@
       </connectors>
       <acceptors>
          <acceptor>tcp://0.0.0.0:61616?tcpNoDelay=456;connectionTtl=44;connectionsAllowed=92</acceptor>
-   	     <acceptor>vm://0?e1=z1;e2=567;connectionsAllowed=87</acceptor>
+         <acceptor>vm://0?e1=z1;e2=567;connectionsAllowed=87</acceptor>
       </acceptors>
       <broadcast-groups>
-	     <broadcast-group name="bg1">
-	        <local-bind-port>10999</local-bind-port>
-	        <group-address>192.168.0.120</group-address>
-	        <group-port>11999</group-port>
+         <broadcast-group name="bg1">
+            <local-bind-port>10999</local-bind-port>
+            <group-address>192.168.0.120</group-address>
+            <group-port>11999</group-port>
             <broadcast-period>12345</broadcast-period>
             <connector-ref>connector1</connector-ref>
-	     </broadcast-group>
+         </broadcast-group>
          <broadcast-group name="bg2">
             <local-bind-port>12999</local-bind-port>
             <group-address>192.168.0.121</group-address>
@@ -118,38 +118,38 @@
       <queues>
          <queue name="queue1">
             <address>address1</address>
-            <filter string="color='red'" />
+            <filter string="color='red'"/>
             <durable>false</durable>
          </queue>
          <queue name="queue2">
             <address>address2</address>
-            <filter string="color='blue'" />
+            <filter string="color='blue'"/>
             <durable>false</durable>
          </queue>
       </queues>
       <bridges>
          <bridge name="bridge1">
-             <queue-name>queue1</queue-name>
-             <forwarding-address>bridge-forwarding-address1</forwarding-address>
-             <filter string="sku > 1"/>
-             <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
-             <min-large-message-size>4</min-large-message-size>
-             <check-period>31</check-period>
-             <connection-ttl>370</connection-ttl>
-             <retry-interval>3</retry-interval>
-             <retry-interval-multiplier>0.2</retry-interval-multiplier>
-             <max-retry-interval>10002</max-retry-interval>
-             <reconnect-attempts>2</reconnect-attempts>
-             <failover-on-server-shutdown>false</failover-on-server-shutdown>
-             <use-duplicate-detection>true</use-duplicate-detection>
-             <static-connectors>
+            <queue-name>queue1</queue-name>
+            <forwarding-address>bridge-forwarding-address1</forwarding-address>
+            <filter string="sku > 1"/>
+            <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
+            <min-large-message-size>4</min-large-message-size>
+            <check-period>31</check-period>
+            <connection-ttl>370</connection-ttl>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.2</retry-interval-multiplier>
+            <max-retry-interval>10002</max-retry-interval>
+            <reconnect-attempts>2</reconnect-attempts>
+            <failover-on-server-shutdown>false</failover-on-server-shutdown>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <static-connectors>
                <connector-ref>connector1</connector-ref>
-             </static-connectors>
+            </static-connectors>
          </bridge>
          <bridge name="bridge2">
-             <queue-name>queue2</queue-name>
-             <forwarding-address>bridge-forwarding-address2</forwarding-address>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <queue-name>queue2</queue-name>
+            <forwarding-address>bridge-forwarding-address2</forwarding-address>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </bridge>
       </bridges>
       <ha-policy>
@@ -167,35 +167,35 @@
       </ha-policy>
       <cluster-connections>
          <cluster-connection name="cluster-connection1">
-         <address>queues1</address>
-         <connector-ref>connector1</connector-ref>
-         <check-period>331</check-period>
-         <connection-ttl>3370</connection-ttl>
-         <min-large-message-size>321</min-large-message-size>
-         <call-timeout>123</call-timeout>
-         <retry-interval>3</retry-interval>
-         <retry-interval-multiplier>0.25</retry-interval-multiplier>
-         <max-retry-interval>10000</max-retry-interval>
-         <reconnect-attempts>72</reconnect-attempts>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>false</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <call-failover-timeout>123</call-failover-timeout>
-         <static-connectors>
+            <address>queues1</address>
             <connector-ref>connector1</connector-ref>
-            <connector-ref>connector2</connector-ref>
-         </static-connectors>
+            <check-period>331</check-period>
+            <connection-ttl>3370</connection-ttl>
+            <min-large-message-size>321</min-large-message-size>
+            <call-timeout>123</call-timeout>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.25</retry-interval-multiplier>
+            <max-retry-interval>10000</max-retry-interval>
+            <reconnect-attempts>72</reconnect-attempts>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <message-load-balancing>ON_DEMAND</message-load-balancing>
+            <max-hops>1</max-hops>
+            <call-failover-timeout>123</call-failover-timeout>
+            <static-connectors>
+               <connector-ref>connector1</connector-ref>
+               <connector-ref>connector2</connector-ref>
+            </static-connectors>
          </cluster-connection>
          <cluster-connection name="cluster-connection2">
-             <address>queues2</address>
-             <connector-ref>connector2</connector-ref>
-             <call-timeout>456</call-timeout>
-             <retry-interval>4</retry-interval>
-             <use-duplicate-detection>false</use-duplicate-detection>
-             <forward-when-no-consumers>true</forward-when-no-consumers>
-             <max-hops>2</max-hops>
-             <call-failover-timeout>456</call-failover-timeout>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <address>queues2</address>
+            <connector-ref>connector2</connector-ref>
+            <call-timeout>456</call-timeout>
+            <retry-interval>4</retry-interval>
+            <use-duplicate-detection>false</use-duplicate-detection>
+            <message-load-balancing>STRICT</message-load-balancing>
+            <max-hops>2</max-hops>
+            <call-failover-timeout>456</call-failover-timeout>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </cluster-connection>
       </cluster-connections>
       <grouping-handler name="gh1">
@@ -225,7 +225,7 @@
       <memory-warning-threshold>95</memory-warning-threshold>
       <memory-measure-interval>54321</memory-measure-interval>
       <large-messages-directory>largemessagesdir</large-messages-directory>
-       <security-settings>
+      <security-settings>
          <security-setting match="a1">
             <permission type="createNonDurableQueue" roles="a1.1"/>
          </security-setting>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/test/resources/InvalidConfigurationTest0.xml
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/InvalidConfigurationTest0.xml b/artemis-server/src/test/resources/InvalidConfigurationTest0.xml
index e92eb56..db2c2d3 100644
--- a/artemis-server/src/test/resources/InvalidConfigurationTest0.xml
+++ b/artemis-server/src/test/resources/InvalidConfigurationTest0.xml
@@ -15,9 +15,9 @@
   limitations under the License.
 -->
 <configuration
-   xmlns="urn:activemq"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="urn:activemq ../../src/config/common/schema/artemis-server.xsd">
+      xmlns="urn:activemq"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="urn:activemq ../../src/config/common/schema/artemis-server.xsd">
    <core xmlns="urn:activemq:core">
       <name>SomeNameForUseOnTheApplicationServer</name>
       <scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
@@ -76,17 +76,17 @@
       </connectors>
       <acceptors>
          <acceptor name="acceptor1">tcp://localhost:61616</acceptor>
-   	     <acceptor name="acceptor2">vm://0</acceptor>
+         <acceptor name="acceptor2">vm://0</acceptor>
       </acceptors>
 
       <broadcast-groups>
-	     <broadcast-group name="bg1">
-	        <local-bind-port>10999</local-bind-port>
-	        <group-address>192.168.0.120</group-address>
-	        <group-port>11999</group-port>
+         <broadcast-group name="bg1">
+            <local-bind-port>10999</local-bind-port>
+            <group-address>192.168.0.120</group-address>
+            <group-port>11999</group-port>
             <broadcast-period>12345</broadcast-period>
             <connector-ref>connector1</connector-ref>
-	     </broadcast-group>
+         </broadcast-group>
          <broadcast-group name="bg2">
             <local-bind-port>12999</local-bind-port>
             <group-address>192.168.0.121</group-address>
@@ -130,102 +130,102 @@
       <queues>
          <queue name="queue1">
             <address>address1</address>
-            <filter string="color='red'" />
+            <filter string="color='red'"/>
             <durable>false</durable>
          </queue>
          <queue name="queue2">
             <address>address2</address>
-            <filter string="color='blue'" />
+            <filter string="color='blue'"/>
             <durable>false</durable>
          </queue>
       </queues>
       <bridges>
          <bridge name="bridge1">
-             <queue-name>queue1</queue-name>
-             <forwarding-address>bridge-forwarding-address1</forwarding-address>
-             <filter string="sku > 1"/>
-             <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
-             <min-large-message-size>4</min-large-message-size>
-             <check-period>31</check-period>
-             <connection-ttl>370</connection-ttl>
-             <retry-interval>3</retry-interval>
-             <retry-interval-multiplier>0.2</retry-interval-multiplier>
-             <max-retry-interval>10002</max-retry-interval>
-             <reconnect-attempts>2</reconnect-attempts>
-             <failover-on-server-shutdown>false</failover-on-server-shutdown>
-             <use-duplicate-detection>true</use-duplicate-detection>
-             <static-connectors>
+            <queue-name>queue1</queue-name>
+            <forwarding-address>bridge-forwarding-address1</forwarding-address>
+            <filter string="sku > 1"/>
+            <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
+            <min-large-message-size>4</min-large-message-size>
+            <check-period>31</check-period>
+            <connection-ttl>370</connection-ttl>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.2</retry-interval-multiplier>
+            <max-retry-interval>10002</max-retry-interval>
+            <reconnect-attempts>2</reconnect-attempts>
+            <failover-on-server-shutdown>false</failover-on-server-shutdown>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <static-connectors>
                <connector-ref>connector1</connector-ref>
-             </static-connectors>
+            </static-connectors>
          </bridge>
          <bridge name="bridge2">
-             <queue-name>queue2</queue-name>
-             <forwarding-address>bridge-forwarding-address2</forwarding-address>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <queue-name>queue2</queue-name>
+            <forwarding-address>bridge-forwarding-address2</forwarding-address>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </bridge>
       </bridges>
       <cluster-connections>
          <cluster-connection name="cluster-connection1">
-         <address>queues1</address>
-         <connector-ref>connector1</connector-ref>
-         <check-period>331</check-period>
-         <connection-ttl>3370</connection-ttl>
-         <min-large-message-size>321</min-large-message-size>
-         <call-timeout>123</call-timeout>
-         <retry-interval>3</retry-interval>
-         <retry-interval-multiplier>0.25</retry-interval-multiplier>
-         <max-retry-interval>10000</max-retry-interval>
-         <reconnect-attempts>72</reconnect-attempts>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>false</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <call-failover-timeout>123</call-failover-timeout>
-         <static-connectors>
+            <address>queues1</address>
             <connector-ref>connector1</connector-ref>
-            <connector-ref>connector2</connector-ref>
-         </static-connectors>
+            <check-period>331</check-period>
+            <connection-ttl>3370</connection-ttl>
+            <min-large-message-size>321</min-large-message-size>
+            <call-timeout>123</call-timeout>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.25</retry-interval-multiplier>
+            <max-retry-interval>10000</max-retry-interval>
+            <reconnect-attempts>72</reconnect-attempts>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <message-load-balancing>ON_DEMAND</message-load-balancing>
+            <max-hops>1</max-hops>
+            <call-failover-timeout>123</call-failover-timeout>
+            <static-connectors>
+               <connector-ref>connector1</connector-ref>
+               <connector-ref>connector2</connector-ref>
+            </static-connectors>
          </cluster-connection>
          <cluster-connection name="cluster-connection2">
-             <address>queues2</address>
-             <connector-ref>connector2</connector-ref>
-             <call-timeout>456</call-timeout>
-             <retry-interval>4</retry-interval>
-             <use-duplicate-detection>false</use-duplicate-detection>
-             <forward-when-no-consumers>true</forward-when-no-consumers>
-             <max-hops>2</max-hops>
-             <call-failover-timeout>456</call-failover-timeout>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <address>queues2</address>
+            <connector-ref>connector2</connector-ref>
+            <call-timeout>456</call-timeout>
+            <retry-interval>4</retry-interval>
+            <use-duplicate-detection>false</use-duplicate-detection>
+            <message-load-balancing>STRICT</message-load-balancing>
+            <max-hops>2</max-hops>
+            <call-failover-timeout>456</call-failover-timeout>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </cluster-connection>
       </cluster-connections>
 
-    <security-settings>
-      <security-setting match="a1">
-         <permission type="createNonDurableQueue" roles="a1.1"/>
-      </security-setting>
-      <security-setting match="a2">
-         <permission type="deleteNonDurableQueue" roles="a2.1"/>
-      </security-setting>
-   </security-settings>
+      <security-settings>
+         <security-setting match="a1">
+            <permission type="createNonDurableQueue" roles="a1.1"/>
+         </security-setting>
+         <security-setting match="a2">
+            <permission type="deleteNonDurableQueue" roles="a2.1"/>
+         </security-setting>
+      </security-settings>
 
-   <address-settings>
-      <address-setting match="a1">
-         <dead-letter-address>a1.1</dead-letter-address>
-         <expiry-address>a1.2</expiry-address>
-         <redelivery-delay>1</redelivery-delay>
-         <max-size-bytes>81781728121878</max-size-bytes>
-         <page-size-bytes>81738173872337</page-size-bytes>
-         <page-max-cache-size>10</page-max-cache-size>
-         <message-counter-history-day-limit>4</message-counter-history-day-limit>
-      </address-setting>
-      <address-setting match="a2">
-         <dead-letter-address>a2.1</dead-letter-address>
-         <expiry-address>a2.2</expiry-address>
-         <redelivery-delay>5</redelivery-delay>
-         <max-size-bytes>932489234928324</max-size-bytes>
-         <page-size-bytes>7126716262626</page-size-bytes>
-         <page-max-cache-size>20</page-max-cache-size>
-         <message-counter-history-day-limit>AA</message-counter-history-day-limit>
-      </address-setting>
-   </address-settings>
+      <address-settings>
+         <address-setting match="a1">
+            <dead-letter-address>a1.1</dead-letter-address>
+            <expiry-address>a1.2</expiry-address>
+            <redelivery-delay>1</redelivery-delay>
+            <max-size-bytes>81781728121878</max-size-bytes>
+            <page-size-bytes>81738173872337</page-size-bytes>
+            <page-max-cache-size>10</page-max-cache-size>
+            <message-counter-history-day-limit>4</message-counter-history-day-limit>
+         </address-setting>
+         <address-setting match="a2">
+            <dead-letter-address>a2.1</dead-letter-address>
+            <expiry-address>a2.2</expiry-address>
+            <redelivery-delay>5</redelivery-delay>
+            <max-size-bytes>932489234928324</max-size-bytes>
+            <page-size-bytes>7126716262626</page-size-bytes>
+            <page-max-cache-size>20</page-max-cache-size>
+            <message-counter-history-day-limit>AA</message-counter-history-day-limit>
+         </address-setting>
+      </address-settings>
    </core>
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/test/resources/InvalidConfigurationTest1.xml
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/InvalidConfigurationTest1.xml b/artemis-server/src/test/resources/InvalidConfigurationTest1.xml
index debdc10..907ff34 100644
--- a/artemis-server/src/test/resources/InvalidConfigurationTest1.xml
+++ b/artemis-server/src/test/resources/InvalidConfigurationTest1.xml
@@ -15,9 +15,9 @@
   limitations under the License.
 -->
 <configuration
-   xmlns="urn:activemq"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="urn:activemq ../../src/config/common/schema/artemis-server.xsd">
+      xmlns="urn:activemq"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="urn:activemq ../../src/config/common/schema/artemis-server.xsd">
    <core xmlns="urn:activemq:core">
       <name>SomeNameForUseOnTheApplicationServer</name>
       <scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
@@ -76,17 +76,17 @@
       </connectors>
       <acceptors>
          <acceptor name="acceptor1">tcp://localhost:61616</acceptor>
-   	     <acceptor name="acceptor2">vm://0</acceptor>
+         <acceptor name="acceptor2">vm://0</acceptor>
       </acceptors>
 
       <broadcast-groups>
-	     <broadcast-group name="bg1">
-	        <local-bind-port>10999</local-bind-port>
-	        <group-address>192.168.0.120</group-address>
-	        <group-port>11999</group-port>
+         <broadcast-group name="bg1">
+            <local-bind-port>10999</local-bind-port>
+            <group-address>192.168.0.120</group-address>
+            <group-port>11999</group-port>
             <broadcast-period>12345</broadcast-period>
             <connector-ref>connector1</connector-ref>
-	     </broadcast-group>
+         </broadcast-group>
          <broadcast-group name="bg2">
             <local-bind-port>12999</local-bind-port>
             <group-address>192.168.0.121</group-address>
@@ -130,102 +130,102 @@
       <queues>
          <queue name="queue1">
             <address>address1</address>
-            <filter string="color='red'" />
+            <filter string="color='red'"/>
             <durable>false</durable>
          </queue>
          <queue name="queue2">
             <address>address2</address>
-            <filter string="color='blue'" />
+            <filter string="color='blue'"/>
             <durable>false</durable>
          </queue>
       </queues>
       <bridges>
          <bridge name="bridge1">
-             <queue-name>queue1</queue-name>
-             <forwarding-address>bridge-forwarding-address1</forwarding-address>
-             <filter string="sku > 1"/>
-             <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
-             <min-large-message-size>4</min-large-message-size>
-             <check-period>31</check-period>
-             <connection-ttl>370</connection-ttl>
-             <retry-interval>3</retry-interval>
-             <retry-interval-multiplier>0.2</retry-interval-multiplier>
-             <max-retry-interval>10002</max-retry-interval>
-             <reconnect-attempts>2</reconnect-attempts>
-             <failover-on-server-shutdown>false</failover-on-server-shutdown>
-             <use-duplicate-detection>true</use-duplicate-detection>
-             <static-connectors>
+            <queue-name>queue1</queue-name>
+            <forwarding-address>bridge-forwarding-address1</forwarding-address>
+            <filter string="sku > 1"/>
+            <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
+            <min-large-message-size>4</min-large-message-size>
+            <check-period>31</check-period>
+            <connection-ttl>370</connection-ttl>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.2</retry-interval-multiplier>
+            <max-retry-interval>10002</max-retry-interval>
+            <reconnect-attempts>2</reconnect-attempts>
+            <failover-on-server-shutdown>false</failover-on-server-shutdown>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <static-connectors>
                <connector-ref>connector1</connector-ref>
-             </static-connectors>
+            </static-connectors>
          </bridge>
          <bridge name="bridge2">
-             <queue-name>queue2</queue-name>
-             <forwarding-address>bridge-forwarding-address2</forwarding-address>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <queue-name>queue2</queue-name>
+            <forwarding-address>bridge-forwarding-address2</forwarding-address>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </bridge>
       </bridges>
       <cluster-connections>
          <cluster-connection name="cluster-connection1">
-         <address>queues1</address>
-         <connector-ref>connector1</connector-ref>
-         <check-period>331</check-period>
-         <connection-ttl>3370</connection-ttl>
-         <min-large-message-size>321</min-large-message-size>
-         <call-timeout>123</call-timeout>
-         <retry-interval>3</retry-interval>
-         <retry-interval-multiplier>0.25</retry-interval-multiplier>
-         <max-retry-interval>10000</max-retry-interval>
-         <reconnect-attempts>72</reconnect-attempts>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>false</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <call-failover-timeout>123</call-failover-timeout>
-         <static-connectors>
+            <address>queues1</address>
             <connector-ref>connector1</connector-ref>
-            <connector-ref>connector2</connector-ref>
-         </static-connectors>
+            <check-period>331</check-period>
+            <connection-ttl>3370</connection-ttl>
+            <min-large-message-size>321</min-large-message-size>
+            <call-timeout>123</call-timeout>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.25</retry-interval-multiplier>
+            <max-retry-interval>10000</max-retry-interval>
+            <reconnect-attempts>72</reconnect-attempts>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <message-load-balancing>ON_DEMAND</message-load-balancing>
+            <max-hops>1</max-hops>
+            <call-failover-timeout>123</call-failover-timeout>
+            <static-connectors>
+               <connector-ref>connector1</connector-ref>
+               <connector-ref>connector2</connector-ref>
+            </static-connectors>
          </cluster-connection>
          <cluster-connection name="cluster-connection2">
-             <address>queues2</address>
-             <connector-ref>connector2</connector-ref>
-             <call-timeout>456</call-timeout>
-             <retry-interval>4</retry-interval>
-             <use-duplicate-detection>false</use-duplicate-detection>
-             <forward-when-no-consumers>true</forward-when-no-consumers>
-             <max-hops>2</max-hops>
-             <call-failover-timeout>456</call-failover-timeout>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <address>queues2</address>
+            <connector-ref>connector2</connector-ref>
+            <call-timeout>456</call-timeout>
+            <retry-interval>4</retry-interval>
+            <use-duplicate-detection>false</use-duplicate-detection>
+            <message-load-balancing>STRICT</message-load-balancing>
+            <max-hops>2</max-hops>
+            <call-failover-timeout>456</call-failover-timeout>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </cluster-connection>
       </cluster-connections>
 
-    <security-settings>
-      <security-setting match="a1">
-         <permission type="createNonDurableQueue" roles="a1.1"/>
-      </security-setting>
-      <security-setting match="a2">
-         <permission type="deleteNonDurableQueue" roles="a2.1"/>
-      </security-setting>
-   </security-settings>
+      <security-settings>
+         <security-setting match="a1">
+            <permission type="createNonDurableQueue" roles="a1.1"/>
+         </security-setting>
+         <security-setting match="a2">
+            <permission type="deleteNonDurableQueue" roles="a2.1"/>
+         </security-setting>
+      </security-settings>
 
-   <address-settings>
-      <address-setting match="a1">
-         <dead-letter-address>a1.1</dead-letter-address>
-         <expiry-address>a1.2</expiry-address>
-         <redelivery-delay>1</redelivery-delay>
-         <max-size-bytes>81781728121878</max-size-bytes>
-         <page-size-bytes>81738173872337</page-size-bytes>
-         <page-max-cache-size>10</page-max-cache-size>
-         <message-counter-history-day-limit>4</message-counter-history-day-limit>
-      </address-setting>
-      <address-setting match="a2">
-         <dead-letter-address>a2.1</dead-letter-address>
-         <expiry-address>a2.2</expiry-address>
-         <redelivery-delay>5</redelivery-delay>
-         <max-size-bytes>932489234928324</max-size-bytes>
-         <page-size-bytes>7126716262626</page-size-bytes>
-         <page-max-cache-size>20</page-max-cache-size>
-         <message-counter-history-day-limit>8</message-counter-history-day-limit>
-      </address-setting>
-   </address-settings>
+      <address-settings>
+         <address-setting match="a1">
+            <dead-letter-address>a1.1</dead-letter-address>
+            <expiry-address>a1.2</expiry-address>
+            <redelivery-delay>1</redelivery-delay>
+            <max-size-bytes>81781728121878</max-size-bytes>
+            <page-size-bytes>81738173872337</page-size-bytes>
+            <page-max-cache-size>10</page-max-cache-size>
+            <message-counter-history-day-limit>4</message-counter-history-day-limit>
+         </address-setting>
+         <address-setting match="a2">
+            <dead-letter-address>a2.1</dead-letter-address>
+            <expiry-address>a2.2</expiry-address>
+            <redelivery-delay>5</redelivery-delay>
+            <max-size-bytes>932489234928324</max-size-bytes>
+            <page-size-bytes>7126716262626</page-size-bytes>
+            <page-max-cache-size>20</page-max-cache-size>
+            <message-counter-history-day-limit>8</message-counter-history-day-limit>
+         </address-setting>
+      </address-settings>
    </core>
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/artemis-server/src/test/resources/InvalidConfigurationTest2.xml
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/InvalidConfigurationTest2.xml b/artemis-server/src/test/resources/InvalidConfigurationTest2.xml
index 26484d2..b95c10e 100644
--- a/artemis-server/src/test/resources/InvalidConfigurationTest2.xml
+++ b/artemis-server/src/test/resources/InvalidConfigurationTest2.xml
@@ -15,9 +15,9 @@
   limitations under the License.
 -->
 <configuration
-   xmlns="urn:activemq"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="urn:activemq ../../src/config/common/schema/artemis-server.xsd">
+      xmlns="urn:activemq"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="urn:activemq ../../src/config/common/schema/artemis-server.xsd">
    <core xmlns="urn:activemq:core">
       <name>SomeNameForUseOnTheApplicationServer</name>
       <scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
@@ -76,17 +76,17 @@
       </connectors>
       <acceptors>
          <acceptor name="acceptor1">tcp://localhost:61616</acceptor>
-   	     <acceptor name="acceptor2">vm://0</acceptor>
+         <acceptor name="acceptor2">vm://0</acceptor>
       </acceptors>
 
       <broadcast-groups>
-	     <broadcast-group name="bg1">
-	        <local-bind-port>10999</local-bind-port>
-	        <group-address>192.168.0.120</group-address>
-	        <group-port>11999</group-port>
+         <broadcast-group name="bg1">
+            <local-bind-port>10999</local-bind-port>
+            <group-address>192.168.0.120</group-address>
+            <group-port>11999</group-port>
             <broadcast-period>12345</broadcast-period>
             <connector-ref>connector1</connector-ref>
-	     </broadcast-group>
+         </broadcast-group>
          <broadcast-group name="bg2">
             <local-bind-port>12999</local-bind-port>
             <group-address>192.168.0.121</group-address>
@@ -130,103 +130,103 @@
       <queues>
          <queue name="queue1">
             <address>address1</address>
-            <filter string="color='red'" />
+            <filter string="color='red'"/>
             <durable>false</durable>
          </queue>
          <queue name="queue2">
             <address>address2</address>
-            <filter string="color='blue'" />
+            <filter string="color='blue'"/>
             <durable>false</durable>
          </queue>
       </queues>
       <bridges>
          <bridge name="bridge1">
-             <queue-name>queue1</queue-name>
-             <forwarding-address>bridge-forwarding-address1</forwarding-address>
-             <filter string="sku > 1"/>
-             <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
-             <min-large-message-size>4</min-large-message-size>
-             <check-period>31</check-period>
-             <connection-ttl>370</connection-ttl>
-             <retry-interval>3</retry-interval>
-             <retry-interval-multiplier>0.2</retry-interval-multiplier>
-             <max-retry-interval>10002</max-retry-interval>
-             <reconnect-attempts>2</reconnect-attempts>
-             <failover-on-server-shutdown>false</failover-on-server-shutdown>
-             <use-duplicate-detection>true</use-duplicate-detection>
-             <static-connectors>
+            <queue-name>queue1</queue-name>
+            <forwarding-address>bridge-forwarding-address1</forwarding-address>
+            <filter string="sku > 1"/>
+            <transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
+            <min-large-message-size>4</min-large-message-size>
+            <check-period>31</check-period>
+            <connection-ttl>370</connection-ttl>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.2</retry-interval-multiplier>
+            <max-retry-interval>10002</max-retry-interval>
+            <reconnect-attempts>2</reconnect-attempts>
+            <failover-on-server-shutdown>false</failover-on-server-shutdown>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <static-connectors>
                <connector-ref>connector1</connector-ref>
-             </static-connectors>
+            </static-connectors>
          </bridge>
          <bridge name="bridge2">
-             <queue-name>queue2</queue-name>
-             <forwarding-address>bridge-forwarding-address2</forwarding-address>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <queue-name>queue2</queue-name>
+            <forwarding-address>bridge-forwarding-address2</forwarding-address>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </bridge>
       </bridges>
       <cluster-connections>
          <cluster-connection name="cluster-connection1">
-         <address>queues1</address>
-         <connector-ref>connector1</connector-ref>
-         <check-period>331</check-period>
-         <connection-ttl>3370</connection-ttl>
-         <min-large-message-size>321</min-large-message-size>
-         <call-timeout>123</call-timeout>
-         <retry-interval>3</retry-interval>
-         <retry-interval-multiplier>0.25</retry-interval-multiplier>
-         <max-retry-interval>10000</max-retry-interval>
-         <reconnect-attempts>72</reconnect-attempts>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>false</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <call-failover-timeout>123</call-failover-timeout>
-         <static-connectors>
+            <address>queues1</address>
             <connector-ref>connector1</connector-ref>
-            <connector-ref>connector2</connector-ref>
-         </static-connectors>
+            <check-period>331</check-period>
+            <connection-ttl>3370</connection-ttl>
+            <min-large-message-size>321</min-large-message-size>
+            <call-timeout>123</call-timeout>
+            <retry-interval>3</retry-interval>
+            <retry-interval-multiplier>0.25</retry-interval-multiplier>
+            <max-retry-interval>10000</max-retry-interval>
+            <reconnect-attempts>72</reconnect-attempts>
+            <use-duplicate-detection>true</use-duplicate-detection>
+            <message-load-balancing>ON_DEMAND</message-load-balancing>
+            <max-hops>1</max-hops>
+            <call-failover-timeout>123</call-failover-timeout>
+            <static-connectors>
+               <connector-ref>connector1</connector-ref>
+               <connector-ref>connector2</connector-ref>
+            </static-connectors>
          </cluster-connection>
          <cluster-connection name="cluster-connection2">
-             <address>queues2</address>
-             <connector-ref>connector2</connector-ref>
-             <call-timeout>456</call-timeout>
-             <retry-interval>4</retry-interval>
-             <use-duplicate-detection>false</use-duplicate-detection>
-             <forward-when-no-consumers>true</forward-when-no-consumers>
-             <max-hops>2</max-hops>
-             <call-failover-timeout>456</call-failover-timeout>
-             <discovery-group-ref discovery-group-name="dg1"/>
+            <address>queues2</address>
+            <connector-ref>connector2</connector-ref>
+            <call-timeout>456</call-timeout>
+            <retry-interval>4</retry-interval>
+            <use-duplicate-detection>false</use-duplicate-detection>
+            <message-load-balancing>STRICT</message-load-balancing>
+            <max-hops>2</max-hops>
+            <call-failover-timeout>456</call-failover-timeout>
+            <discovery-group-ref discovery-group-name="dg1"/>
          </cluster-connection>
       </cluster-connections>
 
-    <security-settings>
-      <security-setting match="a1">
-         <permission type="createNonDurableQueue" roles="a1.1"/>
-      </security-setting>
-      <security-setting match="a2">
-         <permission type="deleteNonDurableQueue" roles="a2.1"/>
-      </security-setting>
-   </security-settings>
+      <security-settings>
+         <security-setting match="a1">
+            <permission type="createNonDurableQueue" roles="a1.1"/>
+         </security-setting>
+         <security-setting match="a2">
+            <permission type="deleteNonDurableQueue" roles="a2.1"/>
+         </security-setting>
+      </security-settings>
 
-   <address-settings>
-      <address-setting match="a1">
-         <dead-letter-address>a1.1</dead-letter-address>
-         <expiry-address>a1.2</expiry-address>
-         <redelivery-delay>1</redelivery-delay>
-         <max-size-bytes>81781728121878</max-size-bytes>
-         <page-size-bytes>81738173872337</page-size-bytes>
-         <page-max-cache-size>10</page-max-cache-size>
-         <message-counter-history-day-limit>4</message-counter-history-day-limit>
-      </address-setting>
-      <address-setting match="a2">
-         <dead-letter-address>a2.1</dead-letter-address>
-         <expiry-address>a2.2</expiry-address>
-         <redelivery-delay>5</redelivery-delay>
-         <max-size-bytes>932489234928324</max-size-bytes>
-         <page-size-bytes>7126716262626</page-size-bytes>
-         <page-max-cache-size>20</page-max-cache-size>
-         <message-counter-history-day-limit>8</message-counter-history-day-limit>
-      </address-setting>
-   </address-settings>
+      <address-settings>
+         <address-setting match="a1">
+            <dead-letter-address>a1.1</dead-letter-address>
+            <expiry-address>a1.2</expiry-address>
+            <redelivery-delay>1</redelivery-delay>
+            <max-size-bytes>81781728121878</max-size-bytes>
+            <page-size-bytes>81738173872337</page-size-bytes>
+            <page-max-cache-size>10</page-max-cache-size>
+            <message-counter-history-day-limit>4</message-counter-history-day-limit>
+         </address-setting>
+         <address-setting match="a2">
+            <dead-letter-address>a2.1</dead-letter-address>
+            <expiry-address>a2.2</expiry-address>
+            <redelivery-delay>5</redelivery-delay>
+            <max-size-bytes>932489234928324</max-size-bytes>
+            <page-size-bytes>7126716262626</page-size-bytes>
+            <page-max-cache-size>20</page-max-cache-size>
+            <message-counter-history-day-limit>8</message-counter-history-day-limit>
+         </address-setting>
+      </address-settings>
    </core>
 
 </configuration>


Mime
View raw message