activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [2/5] activemq-artemis git commit: Added ability to define 2 "delivery mode" types on a single address
Date Mon, 28 Nov 2016 20:17:16 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
index 11b11ab..d4ec32a 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
@@ -41,6 +41,7 @@ import org.apache.activemq.artemis.core.message.BodyEncoder;
 import org.apache.activemq.artemis.core.paging.PagingStore;
 import org.apache.activemq.artemis.core.paging.cursor.PageSubscription;
 import org.apache.activemq.artemis.core.server.Consumer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.MessageReference;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.RoutingContext;
@@ -886,6 +887,16 @@ public class ScheduledDeliveryHandlerTest extends Assert {
       }
 
       @Override
+      public RoutingType getRoutingType() {
+         return null;
+      }
+
+      @Override
+      public void setRoutingType(RoutingType routingType) {
+
+      }
+
+      @Override
       public boolean isDurable() {
          return false;
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/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 f0eaa36..1ba516d 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
@@ -300,8 +300,8 @@
       </connector-services>
 
       <addresses>
-         <address name="addr1" type="anycast">
-            <queues>
+         <address name="addr1">
+            <anycast>
                <queue name="q1">
                   <durable>false</durable>
                   <filter string="color='blue'"/>
@@ -310,17 +310,27 @@
                   <durable>true</durable>
                   <filter string="color='green'"/>
                </queue>
-            </queues>
+            </anycast>
          </address>
-         <address name="addr2" type="multicast">
-            <queues>
+         <address name="addr2">
+            <multicast>
                <queue name="q3" max-consumers="10" >
                   <filter string="color='red'"/>
                </queue>
                <queue name="q4" delete-on-no-consumers="true">
                   <durable>true</durable>
                </queue>
-            </queues>
+            </multicast>
+         </address>
+         <address name="addr2">
+            <multicast>
+               <queue name="q5" max-consumers="1" />
+               <queue name="q6" max-consumers="1" />
+            </multicast>
+            <anycast>
+               <queue name="q7" max-consumers="-1" />
+               <queue name="q8" max-consumers="-1" />
+            </anycast>
          </address>
       </addresses>
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressConfigTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressConfigTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressConfigTest.java
index f3a0beb..4e3f689 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressConfigTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressConfigTest.java
@@ -17,9 +17,13 @@
 
 package org.apache.activemq.artemis.tests.integration.addressing;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
@@ -45,6 +49,9 @@ public class AddressConfigTest extends ActiveMQTestBase {
       server.start();
       AddressInfo addressInfo = server.getAddressInfo(SimpleString.toSimpleString("myAddress"));
       assertNotNull(addressInfo);
-      assertEquals(AddressInfo.RoutingType.MULTICAST, addressInfo.getRoutingType());
+
+      Set<RoutingType> routingTypeSet = new HashSet<>();
+      routingTypeSet.add(RoutingType.MULTICAST);
+      assertEquals(RoutingType.MULTICAST, addressInfo.getRoutingTypes());
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressingTest.java
index 69d8675..20e4f8c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressingTest.java
@@ -33,11 +33,11 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 public class AddressingTest extends ActiveMQTestBase {
@@ -71,7 +71,7 @@ public class AddressingTest extends ActiveMQTestBase {
          // For each address, create 2 Queues with the same address, assert both queues receive message
 
          AddressInfo addressInfo = new AddressInfo(new SimpleString(consumeAddress));
-         addressInfo.setRoutingType(AddressInfo.RoutingType.MULTICAST);
+         addressInfo.addRoutingType(RoutingType.MULTICAST);
 
          server.createOrUpdateAddressInfo(addressInfo);
          Queue q1 = server.createQueue(new SimpleString(consumeAddress), new SimpleString(consumeAddress + ".1"), null, true, false);
@@ -109,11 +109,11 @@ public class AddressingTest extends ActiveMQTestBase {
          // For each address, create 2 Queues with the same address, assert one queue receive message
 
          AddressInfo addressInfo = new AddressInfo(new SimpleString(consumeAddress));
-         addressInfo.setRoutingType(AddressInfo.RoutingType.ANYCAST);
+         addressInfo.addRoutingType(RoutingType.ANYCAST);
 
          server.createOrUpdateAddressInfo(addressInfo);
-         Queue q1 = server.createQueue(new SimpleString(consumeAddress), new SimpleString(consumeAddress + ".1"), null, true, false);
-         Queue q2 = server.createQueue(new SimpleString(consumeAddress), new SimpleString(consumeAddress + ".2"), null, true, false);
+         Queue q1 = server.createQueue(new SimpleString(consumeAddress), RoutingType.ANYCAST, new SimpleString(consumeAddress + ".1"), null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, false, true);
+         Queue q2 = server.createQueue(new SimpleString(consumeAddress), RoutingType.ANYCAST, new SimpleString(consumeAddress + ".2"), null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, false, true);
 
          ClientSession session = sessionFactory.createSession();
          session.start();
@@ -143,12 +143,12 @@ public class AddressingTest extends ActiveMQTestBase {
 
       SimpleString address = new SimpleString("test.address");
       AddressInfo addressInfo = new AddressInfo(address);
-      addressInfo.setRoutingType(AddressInfo.RoutingType.ANYCAST);
+      addressInfo.addRoutingType(RoutingType.ANYCAST);
 
       server.createOrUpdateAddressInfo(addressInfo);
-      Queue q1 = server.createQueue(address, address.concat(".1"), null, true, false);
-      Queue q2 = server.createQueue(address, address.concat(".2"), null, true, false);
-      Queue q3 = server.createQueue(address, address.concat(".3"), null, true, false);
+      Queue q1 = server.createQueue(address, RoutingType.ANYCAST, address.concat(".1"), null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, false, true);
+      Queue q2 = server.createQueue(address, RoutingType.ANYCAST, address.concat(".2"), null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, false, true);
+      Queue q3 = server.createQueue(address, RoutingType.ANYCAST, address.concat(".3"), null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, false, true);
 
       ClientSession session = sessionFactory.createSession();
       session.start();
@@ -229,7 +229,7 @@ public class AddressingTest extends ActiveMQTestBase {
       SimpleString queueName = SimpleString.toSimpleString(UUID.randomUUID().toString());
       // For each address, create 2 Queues with the same address, assert both queues receive message
       boolean deleteOnNoConsumers = true;
-      Queue q1 = server.createQueue(address, queueName, null, true, false, null, deleteOnNoConsumers, true);
+      Queue q1 = server.createQueue(address, RoutingType.MULTICAST, queueName, null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, deleteOnNoConsumers, true);
 
       ClientSession session = sessionFactory.createSession();
       session.start();
@@ -246,7 +246,7 @@ public class AddressingTest extends ActiveMQTestBase {
       SimpleString queueName = SimpleString.toSimpleString(UUID.randomUUID().toString());
       // For each address, create 2 Queues with the same address, assert both queues receive message
       boolean deleteOnNoConsumers = false;
-      Queue q1 = server.createQueue(address, queueName, null, true, false, null, deleteOnNoConsumers, true);
+      Queue q1 = server.createQueue(address,RoutingType.MULTICAST, queueName, null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, deleteOnNoConsumers, true);
 
       ClientSession session = sessionFactory.createSession();
       session.start();
@@ -263,7 +263,7 @@ public class AddressingTest extends ActiveMQTestBase {
       SimpleString queueName = SimpleString.toSimpleString(UUID.randomUUID().toString());
       // For each address, create 2 Queues with the same address, assert both queues receive message
       boolean deleteOnNoConsumers = false;
-      Queue q1 = server.createQueue(address, queueName, null, true, false, 0, deleteOnNoConsumers, true);
+      Queue q1 = server.createQueue(address, RoutingType.MULTICAST, queueName, null, true, false, 0, deleteOnNoConsumers, true);
 
       Exception expectedException = null;
       String expectedMessage = "Maximum Consumer Limit Reached on Queue";
@@ -282,7 +282,6 @@ public class AddressingTest extends ActiveMQTestBase {
       assertTrue(expectedException.getMessage().contains(queueName));
    }
 
-   @Ignore
    @Test
    public void testUnlimitedMaxConsumers() throws Exception {
       int noConsumers = 50;
@@ -290,7 +289,7 @@ public class AddressingTest extends ActiveMQTestBase {
       SimpleString queueName = SimpleString.toSimpleString(UUID.randomUUID().toString());
       // For each address, create 2 Queues with the same address, assert both queues receive message
       boolean deleteOnNoConsumers = false;
-      Queue q1 = server.createQueue(address, queueName, null, true, false, -1, deleteOnNoConsumers, false);
+      Queue q1 = server.createQueue(address, RoutingType.MULTICAST, queueName, null, true, false, Queue.MAX_CONSUMERS_UNLIMITED, deleteOnNoConsumers, true);
 
       ClientSession session = sessionFactory.createSession();
       session.start();
@@ -299,30 +298,4 @@ public class AddressingTest extends ActiveMQTestBase {
          session.createConsumer(q1.getName());
       }
    }
-
-   @Ignore
-   @Test
-   public void testDefaultMaxConsumersFromAddress() throws Exception {
-      int noConsumers = 50;
-      SimpleString address = new SimpleString("test.address");
-      SimpleString queueName = SimpleString.toSimpleString(UUID.randomUUID().toString());
-      // For each address, create 2 Queues with the same address, assert both queues receive message
-      boolean deleteOnNoConsumers = false;
-      AddressInfo addressInfo = new AddressInfo(address);
-      addressInfo.setDefaultMaxQueueConsumers(0);
-      Queue q1 = server.createQueue(address, queueName, null, true, false, null, deleteOnNoConsumers, false);
-
-      ClientSession session = sessionFactory.createSession();
-      session.start();
-
-      for (int i = 0; i < noConsumers; i++) {
-         session.createConsumer(q1.getName());
-      }
-   }
-
-   @Ignore
-   @Test
-   public void testDefaultDeleteOnNoConsumersFromAddress() {
-      fail("Not Implemented");
-   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
index 4fceaef..c04fc0b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
@@ -26,6 +26,7 @@ import org.apache.activemq.artemis.cli.commands.address.CreateAddress;
 import org.apache.activemq.artemis.cli.commands.address.DeleteAddress;
 import org.apache.activemq.artemis.cli.commands.address.ShowAddress;
 import org.apache.activemq.artemis.core.config.DivertConfiguration;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
 import org.junit.Before;
@@ -120,10 +121,10 @@ public class AddressCommandTest extends JMSTestBase {
 
       // Create bindings
       SimpleString address = new SimpleString("address");
-      server.createAddressInfo(new AddressInfo(address));
-      server.createQueue(address, new SimpleString("queue1"), null, true, false);
-      server.createQueue(address, new SimpleString("queue2"), null, true, false);
-      server.createQueue(address, new SimpleString("queue3"), null, true, false);
+      server.createAddressInfo(new AddressInfo(address, RoutingType.MULTICAST));
+      server.createQueue(address, RoutingType.MULTICAST, new SimpleString("queue1"), null, true, false);
+      server.createQueue(address, RoutingType.MULTICAST, new SimpleString("queue2"), null, true, false);
+      server.createQueue(address, RoutingType.MULTICAST, new SimpleString("queue3"), null, true, false);
 
       DivertConfiguration divertConfiguration = new DivertConfiguration();
       divertConfiguration.setName(address.toString());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
index 8822015..7932dc8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
@@ -50,6 +50,7 @@ import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionReceiveMessage;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.MessageReference;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.QueueConfig;
@@ -224,6 +225,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
                              final boolean durable,
                              final boolean temporary,
                              final boolean autoCreated,
+                             final RoutingType deliveryMode,
                              final Integer maxConsumers,
                              final Boolean deleteOnNoConsumers,
                              final ScheduledExecutorService scheduledExecutor,
@@ -231,7 +233,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
                              final StorageManager storageManager,
                              final HierarchicalRepository<AddressSettings> addressSettingsRepository,
                              final Executor executor) {
-            super(id, address, name, filter, pageSubscription, user, durable, temporary, autoCreated, maxConsumers, deleteOnNoConsumers, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executor);
+            super(id, address, name, filter, pageSubscription, user, durable, temporary, autoCreated, deliveryMode, maxConsumers, deleteOnNoConsumers, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executor);
          }
 
          @Override
@@ -258,7 +260,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
 
          @Override
          public Queue createQueueWith(final QueueConfig config) {
-            queue = new MyQueueWithBlocking(config.id(), config.address(), config.name(), config.filter(), config.user(), config.pageSubscription(), config.isDurable(), config.isTemporary(), config.isAutoCreated(), config.maxConsumers(), config.isDeleteOnNoConsumers(), scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor());
+            queue = new MyQueueWithBlocking(config.id(), config.address(), config.name(), config.filter(), config.user(), config.pageSubscription(), config.isDurable(), config.isTemporary(), config.isAutoCreated(), config.deliveryMode(), config.maxConsumers(), config.isDeleteOnNoConsumers(), scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor());
             return queue;
          }
 
@@ -273,7 +275,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
                                   final boolean durable,
                                   final boolean temporary,
                                   final boolean autoCreated) {
-            queue = new MyQueueWithBlocking(persistenceID, address, name, filter, user, pageSubscription, durable, temporary, autoCreated, null, null, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor());
+            queue = new MyQueueWithBlocking(persistenceID, address, name, filter, user, pageSubscription, durable, temporary, autoCreated, RoutingType.MULTICAST, null, null, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor());
             return queue;
          }
 
@@ -355,7 +357,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
       long txID = server.getStorageManager().generateID();
 
       // Forcing a situation where the server would unexpectedly create a duplicated queue. The server should still start normally
-      LocalQueueBinding newBinding = new LocalQueueBinding(server.getAddressInfo(QUEUE), new QueueImpl(queueID, QUEUE, QUEUE, null, null, true, false, false, null, null, null, null, null), server.getNodeID());
+      LocalQueueBinding newBinding = new LocalQueueBinding(QUEUE, new QueueImpl(queueID, QUEUE, QUEUE, null, null, true, false, false, null, null, null, null, null), server.getNodeID());
       server.getStorageManager().addQueueBinding(txID, newBinding);
       server.getStorageManager().commitBindings(txID);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java
index d7af4b8..9e66ab3 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java
@@ -31,6 +31,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
@@ -89,7 +90,7 @@ public class ProducerTest extends ActiveMQTestBase {
       server.getConfiguration().getAddressesSettings().put(QUEUE.toString(), setting);
       server.start();
 
-      server.createQueue(QUEUE, QUEUE, null, true, false);
+      server.createQueue(QUEUE, RoutingType.MULTICAST, QUEUE, null, true, false);
 
       for (int i = 0; i < 100; i++) {
          final CountDownLatch latch = new CountDownLatch(1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
index f413113..ba7ddd4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
@@ -19,10 +19,10 @@ package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 import java.util.List;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.Queue;
 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.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.util.Wait;
 import org.junit.Test;
 
@@ -55,7 +55,7 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
 
       List<Queue> queues;
       for (int i = 0; i < 3; i++) {
-         createAddressInfo(i, address, AddressInfo.RoutingType.ANYCAST, -1, false);
+         createAddressInfo(i, address, RoutingType.ANYCAST, -1, false);
          setupSessionFactory(i, isNetty());
          createQueue(i, address, queueName, null, false);
          addConsumer(i, i, queueName, null);
@@ -116,7 +116,7 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
 
       List<Queue> queues;
       for (int i = 0; i < 3; i++) {
-         createAddressInfo(i, address, AddressInfo.RoutingType.ANYCAST, -1, false);
+         createAddressInfo(i, address, RoutingType.ANYCAST, -1, false);
          setupSessionFactory(i, isNetty());
          createQueue(i, address, queueNamePrefix + i, null, false);
          addConsumer(i, i, queueNamePrefix + i, null);
@@ -176,7 +176,7 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
 
       List<Queue> queues;
       for (int i = 0; i < 3; i++) {
-         createAddressInfo(i, address, AddressInfo.RoutingType.ANYCAST, -1, false);
+         createAddressInfo(i, address, RoutingType.ANYCAST, -1, false);
          setupSessionFactory(i, isNetty());
 
       }
@@ -238,7 +238,7 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
 
       List<Queue> queues;
       for (int i = 0; i < 3; i++) {
-         createAddressInfo(i, address, AddressInfo.RoutingType.MULTICAST, -1, false);
+         createAddressInfo(i, address, RoutingType.MULTICAST, -1, false);
          setupSessionFactory(i, isNetty());
          createQueue(i, address, queueNamePrefix + i, null, false);
          addConsumer(i, i, queueNamePrefix + i, null);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
index 541eaca..49482d8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -68,6 +68,7 @@ import org.apache.activemq.artemis.core.protocol.core.impl.CoreProtocolManagerFa
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.core.server.cluster.ActiveMQServerSideProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
@@ -521,14 +522,11 @@ public abstract class ClusterTestBase extends ActiveMQTestBase {
 
    protected void createAddressInfo(final int node,
                                     final String address,
-                                    final AddressInfo.RoutingType routingType,
+                                    final RoutingType routingType,
                                     final int defaulMaxConsumers,
                                     boolean defaultDeleteOnNoConsumers) throws Exception {
       AddressInfo addressInfo = new AddressInfo(new SimpleString(address));
-      addressInfo.setRoutingType(routingType);
-      addressInfo.setDefaultMaxQueueConsumers(defaulMaxConsumers);
-      addressInfo.setDefaultDeleteOnNoConsumers(defaultDeleteOnNoConsumers);
-
+      addressInfo.addRoutingType(routingType);
       servers[node].createOrUpdateAddressInfo(addressInfo);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
index 7dc5162..a40e2c0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
@@ -143,7 +143,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase {
 
                ClientSession createSession = sf.createSession(true, true);
 
-               createSession.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+               createSession.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, (SimpleString) null, true);
 
                RemotingConnection conn = ((ClientSessionInternal) createSession).getConnection();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
index b51ff8a..0fe440f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
@@ -41,6 +41,7 @@ import org.apache.activemq.artemis.core.paging.PagingStore;
 import org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal;
 import org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager;
 import org.apache.activemq.artemis.core.server.Queue;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.files.FileMoveManager;
 import org.apache.activemq.artemis.tests.integration.cluster.util.BackupSyncDelay;
 import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
@@ -331,7 +332,7 @@ public class BackupSyncJournalTest extends FailoverTestBase {
 
    protected void createProducerSendSomeMessages() throws ActiveMQException {
       session = addClientSession(sessionFactory.createSession(true, true));
-      session.createQueue(ADDRESS, ADDRESS, null, true);
+      session.createQueue(ADDRESS, RoutingType.MULTICAST, ADDRESS, null, true);
       if (producer != null)
          producer.close();
       producer = addClientProducer(session.createProducer(ADDRESS));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
index 982e214..1b9fca4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
@@ -45,6 +45,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.MessageHandler;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.cluster.ha.BackupPolicy;
 import org.apache.activemq.artemis.core.server.cluster.ha.HAPolicy;
 import org.apache.activemq.artemis.core.server.cluster.ha.ReplicaPolicy;
@@ -115,7 +116,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf1, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -180,7 +181,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf1, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -241,7 +242,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf1, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -334,7 +335,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf1, true, false, false);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -380,7 +381,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf1, true, false, false);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -431,7 +432,7 @@ public class FailoverTest extends FailoverTestBase {
 
       ClientSession session = createSession(sf, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -476,7 +477,7 @@ public class FailoverTest extends FailoverTestBase {
 
       ClientSession session = createSession(sf, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -761,7 +762,7 @@ public class FailoverTest extends FailoverTestBase {
    protected ClientSession createSessionAndQueue() throws Exception {
       ClientSession session = createSession(sf, false, false);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
       return session;
    }
 
@@ -777,7 +778,7 @@ public class FailoverTest extends FailoverTestBase {
 
       ClientSession session = createSession(sf);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1049,7 +1050,7 @@ public class FailoverTest extends FailoverTestBase {
 
       Xid xid = new XidImpl("uhuhuhu".getBytes(), 126512, "auhsduashd".getBytes());
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1085,7 +1086,7 @@ public class FailoverTest extends FailoverTestBase {
 
       Xid xid = new XidImpl("uhuhuhu".getBytes(), 126512, "auhsduashd".getBytes());
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1122,7 +1123,7 @@ public class FailoverTest extends FailoverTestBase {
 
       Xid xid = new XidImpl("uhuhuhu".getBytes(), 126512, "auhsduashd".getBytes());
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1164,7 +1165,7 @@ public class FailoverTest extends FailoverTestBase {
 
       Xid xid = new XidImpl("uhuhuhu".getBytes(), 126512, "auhsduashd".getBytes());
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1201,7 +1202,7 @@ public class FailoverTest extends FailoverTestBase {
 
       Xid xid = new XidImpl("uhuhuhu".getBytes(), 126512, "auhsduashd".getBytes());
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1434,7 +1435,7 @@ public class FailoverTest extends FailoverTestBase {
          for (int j = 0; j < numConsumersPerSession; j++) {
             SimpleString queueName = new SimpleString("queue" + i + "-" + j);
 
-            session.createQueue(FailoverTestBase.ADDRESS, queueName, null, true);
+            session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, queueName, null, true);
 
             ClientConsumer consumer = session.createConsumer(queueName);
 
@@ -1474,7 +1475,7 @@ public class FailoverTest extends FailoverTestBase {
       createSessionFactory();
       ClientSession session = createSession(sf, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1504,7 +1505,7 @@ public class FailoverTest extends FailoverTestBase {
 
       ClientSession session = createSession(sf, true, true);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1583,7 +1584,7 @@ public class FailoverTest extends FailoverTestBase {
 
       ClientSession session = createSession(sf, true, true, 0);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1636,9 +1637,9 @@ public class FailoverTest extends FailoverTestBase {
       ClientSession session = createSession(sf, true, true, 0);
 
       if (temporary) {
-         session.createTemporaryQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null);
+         session.createTemporaryQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null);
       } else {
-         session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, durable);
+         session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, durable);
       }
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
@@ -1665,7 +1666,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf, true, true, 0);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1714,7 +1715,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf, false, false);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
 
@@ -1845,7 +1846,7 @@ public class FailoverTest extends FailoverTestBase {
 
       final ClientSession session = createSession(sf, false, false);
 
-      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
+      session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, true);
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
       sendMessages(session, producer, NUM_MESSAGES);
@@ -2115,7 +2116,7 @@ public class FailoverTest extends FailoverTestBase {
       ClientSession session = createSession(sf1, false, true, true);
 
       if (createQueue) {
-         session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, false);
+         session.createQueue(FailoverTestBase.ADDRESS, RoutingType.MULTICAST, FailoverTestBase.ADDRESS, null, false);
       }
 
       ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverTest.java
index 392af31..5b20b90 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverTest.java
@@ -22,6 +22,7 @@ import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
 import org.junit.Test;
 
@@ -66,7 +67,7 @@ public class ReplicatedMultipleServerFailoverTest extends MultipleServerFailover
          ClientSession[] sessions = new ClientSession[liveServers.size()];
          for (int i = 0; i < factories.length; i++) {
             sessions[i] = createSession(factories[i], true, true);
-            sessions[i].createQueue(ADDRESS, ADDRESS, null, true);
+            sessions[i].createQueue(ADDRESS, RoutingType.MULTICAST, ADDRESS, null, true);
          }
 
          //make sure bindings are ready before sending messages

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
index 83e516c..b92e283 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
@@ -251,7 +251,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
 
       ClientSession session = addClientSession(sf.createSession(false, true, true));
 
-      session.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+      session.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
       ClientProducer producer = session.createProducer(MultiThreadRandomReattachTestBase.ADDRESS);
 
@@ -307,7 +307,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
 
          sessConsume.start();
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -383,7 +383,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
 
          ClientSession sessConsume = createAutoCommitSession(sf);
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -467,7 +467,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
 
          sessConsume.start();
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -566,7 +566,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
          ClientSession sessConsume = sf.createSession(false, false, false);
          sessConsume.addMetaData("data", RandomUtil.randomString());
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -695,7 +695,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
 
          sessConsume.start();
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -750,7 +750,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
          ClientSession sessConsume = sf.createSession(false, true, true);
          sessConsume.addMetaData("data", RandomUtil.randomString());
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -811,7 +811,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
 
          sessConsume.start();
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -882,7 +882,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
          ClientSession sessConsume = sf.createSession(false, false, false);
          sessConsume.addMetaData("data", RandomUtil.randomString());
 
-         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, null, false);
+         sessConsume.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, subName, (SimpleString) null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 
@@ -942,7 +942,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
       ClientSession sessCreate = sf.createSession(false, true, true);
       sessCreate.addMetaData("data", RandomUtil.randomString());
 
-      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), null, false);
+      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), (SimpleString) null, false);
 
       ClientSession sess = sf.createSession(false, true, true);
       sess.addMetaData("data", RandomUtil.randomString());
@@ -973,7 +973,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
       ClientSession sessCreate = sf.createSession(false, true, true);
       sessCreate.addMetaData("data", RandomUtil.randomString());
 
-      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), null, false);
+      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), (SimpleString) null, false);
 
       ClientSession sess = sf.createSession(false, true, true);
       sess.addMetaData("data", RandomUtil.randomString());
@@ -1004,7 +1004,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
       ClientSession s = sf.createSession(false, false, false);
       s.addMetaData("data", RandomUtil.randomString());
 
-      s.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), null, false);
+      s.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), (SimpleString) null, false);
 
       final int numConsumers = 100;
 
@@ -1037,7 +1037,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
    protected void doTestN(final ClientSessionFactory sf, final int threadNum) throws Exception {
       ClientSession sessCreate = sf.createSession(false, true, true);
 
-      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), null, false);
+      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), (SimpleString) null, false);
 
       ClientSession sess = sf.createSession(false, true, true);
       sess.addMetaData("data", RandomUtil.randomString());
@@ -1077,7 +1077,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
    protected void doTestO(final ClientSessionFactory sf, final int threadNum) throws Exception {
       ClientSession sessCreate = sf.createSession(false, true, true);
 
-      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), null, false);
+      sessCreate.createQueue(MultiThreadRandomReattachTestBase.ADDRESS, new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()), (SimpleString) null, false);
 
       ClientSession sess = sf.createSession(false, true, true);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java
index f174f3e..231511a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java
@@ -34,6 +34,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
 import org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
@@ -159,7 +160,7 @@ public class OrderReattachTest extends ActiveMQTestBase {
 
          ClientSession sessConsume = sf.createSession(false, true, true);
 
-         sessConsume.createQueue(ADDRESS, subName, null, false);
+         sessConsume.createQueue(ADDRESS, RoutingType.MULTICAST, subName, null, false);
 
          ClientConsumer consumer = sessConsume.createConsumer(subName);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java
index 968a3a7..752e60a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java
@@ -29,6 +29,7 @@ import org.apache.activemq.ActiveMQXAConnectionFactory;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.qpid.jms.JmsConnectionFactory;
@@ -59,7 +60,7 @@ public class OpenWireToAMQPTest extends ActiveMQTestBase {
       serverConfig.setSecurityEnabled(false);
       server.start();
       coreQueue = new SimpleString(queueName);
-      this.server.createQueue(coreQueue, coreQueue, null, false, false);
+      this.server.createQueue(coreQueue, RoutingType.MULTICAST, coreQueue, null, false, false);
       qpidfactory = new JmsConnectionFactory("amqp://localhost:61616");
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java
index 0d94734..a9501d8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java
@@ -34,6 +34,7 @@ import org.apache.activemq.artemis.core.postoffice.impl.DivertBinding;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.core.server.Divert;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.core.server.cluster.Transformer;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
@@ -71,9 +72,9 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName2 = new SimpleString("queue2");
 
-      session.createQueue(new SimpleString(forwardAddress), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName2, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName2, null, false);
 
       session.start();
 
@@ -148,11 +149,11 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName2 = new SimpleString("queue2");
 
-      session.createQueue(new SimpleString(forwardAddress), queueName1, null, true);
+      session.createQueue(new SimpleString(forwardAddress), RoutingType.MULTICAST, queueName1, null, true);
 
-      session.createQueue(new SimpleString(testAddress), queueName2, null, true);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName2, null, true);
 
-      session.createQueue(new SimpleString(expiryAddress), new SimpleString(expiryAddress), null, true);
+      session.createQueue(new SimpleString(expiryAddress), RoutingType.MULTICAST, new SimpleString(expiryAddress), null, true);
 
       session.start();
 
@@ -253,13 +254,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName2, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName3, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -355,7 +356,7 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName1 = new SimpleString("queue1");
 
-      session.createQueue(new SimpleString(forwardAddress), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress), RoutingType.MULTICAST, queueName1, null, false);
 
       session.start();
 
@@ -415,11 +416,11 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName2, null, false);
-      session.createQueue(new SimpleString(testAddress), queueName3, null, false);
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName2, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName3, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -497,13 +498,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress1), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress1), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress2), queueName2, null, false);
+      session.createQueue(new SimpleString(forwardAddress2), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress3), queueName3, null, false);
+      session.createQueue(new SimpleString(forwardAddress3), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -612,13 +613,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress1), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress1), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress2), queueName2, null, false);
+      session.createQueue(new SimpleString(forwardAddress2), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress3), queueName3, null, false);
+      session.createQueue(new SimpleString(forwardAddress3), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -716,13 +717,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress1), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress1), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress2), queueName2, null, false);
+      session.createQueue(new SimpleString(forwardAddress2), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress3), queueName3, null, false);
+      session.createQueue(new SimpleString(forwardAddress3), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -814,13 +815,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress1), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress1), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress2), queueName2, null, false);
+      session.createQueue(new SimpleString(forwardAddress2), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress3), queueName3, null, false);
+      session.createQueue(new SimpleString(forwardAddress3), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -960,13 +961,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress1), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress1), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress2), queueName2, null, false);
+      session.createQueue(new SimpleString(forwardAddress2), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress3), queueName3, null, false);
+      session.createQueue(new SimpleString(forwardAddress3), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -1085,13 +1086,13 @@ public class DivertTest extends ActiveMQTestBase {
 
       final SimpleString queueName4 = new SimpleString("queue4");
 
-      session.createQueue(new SimpleString(forwardAddress1), queueName1, null, false);
+      session.createQueue(new SimpleString(forwardAddress1), RoutingType.MULTICAST, queueName1, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress2), queueName2, null, false);
+      session.createQueue(new SimpleString(forwardAddress2), RoutingType.MULTICAST, queueName2, null, false);
 
-      session.createQueue(new SimpleString(forwardAddress3), queueName3, null, false);
+      session.createQueue(new SimpleString(forwardAddress3), RoutingType.MULTICAST, queueName3, null, false);
 
-      session.createQueue(new SimpleString(testAddress), queueName4, null, false);
+      session.createQueue(new SimpleString(testAddress), RoutingType.MULTICAST, queueName4, null, false);
 
       session.start();
 
@@ -1173,7 +1174,7 @@ public class DivertTest extends ActiveMQTestBase {
       ActiveMQServer server = addServer(new ActiveMQServerImpl(null, null, null, null, serviceRegistry));
       server.start();
       server.waitForActivation(100, TimeUnit.MILLISECONDS);
-      server.deployQueue(ADDRESS, SimpleString.toSimpleString("myQueue"), null, false, false);
+      server.deployQueue(ADDRESS, RoutingType.MULTICAST, SimpleString.toSimpleString("myQueue"), null, false, false);
       server.deployDivert(new DivertConfiguration().setName(DIVERT).setAddress(ADDRESS.toString()).setForwardingAddress(ADDRESS.toString()));
       Collection<Binding> bindings = server.getPostOffice().getBindingsForAddress(ADDRESS).getBindings();
       Divert divert = null;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
index bbbe6ed..f8094a1 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
@@ -83,7 +83,7 @@ public class TopicCleanupTest extends JMSTestBase {
 
             final Queue queue = new QueueImpl(storage.generateID(), SimpleString.toSimpleString("topic"), SimpleString.toSimpleString("topic"), FilterImpl.createFilter(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), null, true, false, false, server.getScheduledPool(), server.getPostOffice(), storage, server.getAddressSettingsRepository(), server.getExecutorFactory().getExecutor());
 
-            LocalQueueBinding binding = new LocalQueueBinding(server.getAddressInfo(queue.getAddress()), queue, server.getNodeID());
+            LocalQueueBinding binding = new LocalQueueBinding(queue.getAddress(), queue, server.getNodeID());
 
             storage.addQueueBinding(txid, binding);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java
index 28643cf..80dac25 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java
@@ -640,7 +640,7 @@ public class ConsumerTest extends JMSTestBase {
    }
 
    @Test
-   public void testShareDurale() throws Exception {
+   public void testShareDurable() throws Exception {
       ((ActiveMQConnectionFactory) cf).setConsumerWindowSize(0);
       conn = cf.createConnection();
       conn.start();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
index 931089c..3dc5fb2 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
@@ -17,11 +17,13 @@
 package org.apache.activemq.artemis.tests.integration.management;
 
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.activemq.artemis.api.core.ActiveMQAddressDoesNotExistException;
 import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl;
 import org.apache.activemq.artemis.api.core.management.Parameter;
 import org.apache.activemq.artemis.api.core.management.ResourceNames;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 
 public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTest {
@@ -101,18 +103,18 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
          }
 
          @Override
-         public void createAddress(@Parameter(name = "name", desc = "The name of the address") String name, @Parameter(name = "routingType", desc = "the routing type of the address either 0 for multicast or 1 for anycast") int routingType, @Parameter(name = "defaultDeleteOnNoConsumers", desc = "Whether or not a queue with this address is deleted when it has no consumers") boolean defaultDeleteOnNoConsumers, @Parameter(name = "defaultMaxConsumers", desc = "The maximim number of consumer a queue with this address can have") int defaultMaxConsumers) throws Exception {
-            proxy.invokeOperation("createAddress", name, routingType, defaultDeleteOnNoConsumers, defaultMaxConsumers);
-         }
+         public void createQueue(@Parameter(name = "address", desc = "Address of the queue") String address,
+                                 @Parameter(name = "routingType", desc = "The routing type used for this address, 0=multicast, 1=anycast") RoutingType routingType,
+                                 @Parameter(name = "name", desc = "Name of the queue") String name,
+                                 @Parameter(name = "filter", desc = "Filter of the queue") String filterStr,
+                                 @Parameter(name = "durable", desc = "Is the queue durable?") boolean durable,
+                                 @Parameter(name = "maxConsumers", desc = "The maximum number of consumers allowed on this queue at any one time") int maxConsumers,
+                                 @Parameter(name = "deleteOnNoConsumers", desc = "Delete this queue when the last consumer disconnects") boolean deleteOnNoConsumers,
+                                 @Parameter(name = "autoCreateAddress", desc = "Create an address with default values should a matching address not be found") boolean autoCreateAddress) throws Exception {
 
-         @Override
-         public void createAddress(@Parameter(name = "name", desc = "The name of the address") String name,
-                                   @Parameter(name = "routingType", desc = "The routing type for the address either 'MULTICAST' or 'ANYCAST'") String routingType,
-                                   @Parameter(name = "defaultDeleteOnNoConsumers", desc = "Whether or not a queue with this address is deleted when it has no consumers") boolean defaultDeleteOnNoConsumers,
-                                   @Parameter(name = "defaultMaxConsumers", desc = "The maximim number of consumer a queue with this address can have") int defaultMaxConsumers) throws Exception {
-            proxy.invokeOperation("createAddress", name, routingType, defaultDeleteOnNoConsumers, defaultMaxConsumers);
          }
 
+
          @Override
          public void deleteAddress(@Parameter(name = "name", desc = "The name of the address") String name) throws Exception {
             proxy.invokeOperation("deleteAddress", name);
@@ -131,16 +133,6 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
             proxy.invokeOperation("createQueue", address, name, durable);
          }
 
-         @Override
-         public void createQueue(@Parameter(name = "address", desc = "Address of the queue") String address,
-                                 @Parameter(name = "name", desc = "Name of the queue") String name,
-                                 @Parameter(name = "filter", desc = "Filter of the queue") String filter,
-                                 @Parameter(name = "durable", desc = "Is the queue durable?") boolean durable,
-                                 @Parameter(name = "maxConsumers", desc = "The maximum number of consumers allowed on this queue at any one time") int maxConsumers,
-                                 @Parameter(name = "deleteOnNoConsumers", desc = "Delete this queue when the last consumer disconnects") boolean deleteOnNoConsumers,
-                                 @Parameter(name = "autoCreateAddress", desc = "Create an address with default values should a matching address not be found") boolean autoCreateAddress) throws Exception {
-
-         }
 
          @Override
          public void deployQueue(final String address,
@@ -574,6 +566,12 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
          }
 
          @Override
+         public void createAddress(@Parameter(name = "name", desc = "The name of the address") String name,
+                                   @Parameter(name = "deliveryMode", desc = "The delivery modes enabled for this address'") Set<RoutingType> routingTypes) throws Exception {
+
+         }
+
+         @Override
          public void addSecuritySettings(String addressMatch,
                                          String sendRoles,
                                          String consumeRoles,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
index 3095cb5..c342853 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
@@ -38,6 +38,8 @@ import java.util.regex.Pattern;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager;
 import org.apache.activemq.artemis.core.protocol.mqtt.MQTTSession;
+import org.apache.activemq.artemis.core.server.Queue;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.integration.mqtt.imported.util.Wait;
 import org.fusesource.mqtt.client.BlockingConnection;
@@ -1625,10 +1627,9 @@ public class MQTTTest extends MQTTTestSupport {
          Topic[] mqttSubscription = new Topic[]{new Topic("foo/bar", QoS.AT_LEAST_ONCE)};
 
          AddressInfo addressInfo = new AddressInfo(coreAddress);
-         addressInfo.setDefaultMaxQueueConsumers(0);
          getServer().createOrUpdateAddressInfo(addressInfo);
 
-         getServer().createQueue(coreAddress, new SimpleString(clientId + "." + coreAddress), null, false, true, 0, false, false);
+         getServer().createQueue(coreAddress, RoutingType.MULTICAST, new SimpleString(clientId + "." + coreAddress), null, false, true, 0, false, false);
 
          MQTT mqtt = createMQTTConnection();
          mqtt.setClientId(clientId);
@@ -1652,7 +1653,7 @@ public class MQTTTest extends MQTTTestSupport {
          Topic[] mqttSubscription = new Topic[]{new Topic("foo/bar", QoS.AT_LEAST_ONCE)};
 
          AddressInfo addressInfo = new AddressInfo(coreAddress);
-         addressInfo.setRoutingType(AddressInfo.RoutingType.ANYCAST);
+         addressInfo.addRoutingType(RoutingType.ANYCAST);
          getServer().createOrUpdateAddressInfo(addressInfo);
 
          MQTT mqtt = createMQTTConnection();
@@ -1674,7 +1675,7 @@ public class MQTTTest extends MQTTTestSupport {
       try {
          String clientId = "testMqtt";
          SimpleString coreAddress = new SimpleString("foo.bar");
-         getServer().createQueue(coreAddress, new SimpleString(clientId + "." + coreAddress), null, false, true, -1, true, false);
+         getServer().createQueue(coreAddress, RoutingType.MULTICAST, new SimpleString(clientId + "." + coreAddress), null, false, true, Queue.MAX_CONSUMERS_UNLIMITED, true, false);
 
          Topic[] mqttSubscription = new Topic[]{new Topic("foo/bar", QoS.AT_LEAST_ONCE)};
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
index c847d0a..7c40834 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
@@ -32,6 +32,7 @@ import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.ActiveMQXAConnectionFactory;
 import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
 import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.junit.After;
 import org.junit.Before;
@@ -64,15 +65,15 @@ public class BasicOpenWireTest extends OpenWireTestBase {
    public void setUp() throws Exception {
       super.setUp();
       SimpleString coreQueue = new SimpleString(queueName);
-      this.server.createQueue(coreQueue, coreQueue, null, false, false);
+      this.server.createQueue(coreQueue, RoutingType.MULTICAST, coreQueue, null, false, false);
       testQueues.put(queueName, coreQueue);
 
       SimpleString coreQueue2 = new SimpleString(queueName2);
-      this.server.createQueue(coreQueue2, coreQueue2, null, false, false);
+      this.server.createQueue(coreQueue2, RoutingType.MULTICAST, coreQueue2, null, false, false);
       testQueues.put(queueName2, coreQueue2);
 
       SimpleString durableQueue = new SimpleString(durableQueueName);
-      this.server.createQueue(durableQueue, durableQueue, null, true, false);
+      this.server.createQueue(durableQueue, RoutingType.MULTICAST, durableQueue, null, true, false);
       testQueues.put(durableQueueName, durableQueue);
 
       if (!enableSecurity) {
@@ -138,7 +139,7 @@ public class BasicOpenWireTest extends OpenWireTestBase {
       SimpleString coreQ = testQueues.get(qname);
       if (coreQ == null) {
          coreQ = new SimpleString(qname);
-         this.server.createQueue(coreQ, coreQ, null, false, false);
+         this.server.createQueue(coreQ, RoutingType.MULTICAST, coreQ, null, false, false);
          testQueues.put(qname, coreQ);
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRedeliverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRedeliverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRedeliverTest.java
index aa3a170..38f678b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRedeliverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRedeliverTest.java
@@ -65,7 +65,7 @@ public class JmsTopicRedeliverTest extends BasicOpenWireTest {
       System.out.println("Created session: " + session);
       System.out.println("Created consumeSession: " + consumeSession);
       producer = session.createProducer(null);
-      // producer.setDeliveryMode(deliveryMode);
+      // producer.setRoutingType(deliveryMode);
 
       System.out.println("Created producer: " + producer);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dad04960/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
index caacdd0..3d4a72c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
@@ -44,6 +44,7 @@ import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.directory.server.annotations.CreateLdapServer;
@@ -177,8 +178,8 @@ public class LDAPSecurityTest extends AbstractLdapTestUnit {
       roles.add(new Role("programmers", false, false, false, false, false, false, false, false, false, false));
       server.getConfiguration().putSecurityRoles("#", roles);
       server.start();
-      server.createQueue(ADDRESS, DURABLE_QUEUE, null, true, false);
-      server.createQueue(ADDRESS, NON_DURABLE_QUEUE, null, false, false);
+      server.createQueue(ADDRESS, RoutingType.MULTICAST, DURABLE_QUEUE, null, true, false);
+      server.createQueue(ADDRESS, RoutingType.MULTICAST, NON_DURABLE_QUEUE, null, false, false);
 
       ClientSessionFactory cf = locator.createSessionFactory();
       ClientSession session = cf.createSession("first", "secret", false, true, true, false, 0);


Mime
View raw message