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

The following examples show how to use org.apache.activemq.artemis.core.settings.impl.AddressSettings#setDefaultGroupFirstKey() . 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: JMSMessageGroupsTest.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
@Override
protected void configureAddressPolicy(ActiveMQServer server) {
   super.configureAddressPolicy(server);

   AddressSettings addressSettings = new AddressSettings();

   addressSettings.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);
   addressSettings.setAutoCreateQueues(isAutoCreateQueues());
   addressSettings.setAutoCreateAddresses(isAutoCreateAddresses());
   addressSettings.setDeadLetterAddress(SimpleString.toSimpleString(getDeadLetterAddress()));
   addressSettings.setExpiryAddress(SimpleString.toSimpleString(getDeadLetterAddress()));
   addressSettings.setDefaultGroupFirstKey(SimpleString.toSimpleString("JMSXFirstInGroupID"));


   server.getConfiguration().getAddressesSettings().put("GroupFirst.#", addressSettings);
}