Java Code Examples for org.apache.activemq.artemis.core.settings.impl.AddressSettings#setDefaultAddressRoutingType()

The following examples show how to use org.apache.activemq.artemis.core.settings.impl.AddressSettings#setDefaultAddressRoutingType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AmqpSenderRoutingTypeTest.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
protected void configureAddressPolicy(ActiveMQServer server) {
   Configuration serverConfig = server.getConfiguration();
   serverConfig.setJournalType(JournalType.NIO);
   Map<String, AddressSettings> map = serverConfig.getAddressesSettings();
   if (map.size() == 0) {
      AddressSettings as = new AddressSettings();
      as.setDefaultAddressRoutingType(RoutingType.ANYCAST);
      map.put("#", as);
   }
}
 
Example 2
Source File: MqttClusterRemoteSubscribeTest.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
private AddressSettings createAddressSettings() {
   AddressSettings addressSettings = new AddressSettings();
   addressSettings.setRedistributionDelay(0);
   addressSettings.setDefaultAddressRoutingType(RoutingType.ANYCAST);
   return addressSettings;
}