use of org.apache.activemq.broker.region.group.MessageGroupMap in project activemq-artemis by apache.
the class MessageGroupConfigTest method doTestGroupConfiguration.
public MessageGroupMap doTestGroupConfiguration(String type, Class classType) throws Exception {
broker = new BrokerService();
PolicyEntry defaultEntry = new PolicyEntry();
defaultEntry.setMessageGroupMapFactoryType(type);
PolicyMap policyMap = new PolicyMap();
policyMap.setDefaultEntry(defaultEntry);
broker.setDestinationPolicy(policyMap);
broker.start();
super.topic = false;
ActiveMQDestination destination = (ActiveMQDestination) createDestination("org.apache.foo");
Queue brokerDestination = (Queue) broker.getDestination(destination);
assertNotNull(brokerDestination);
MessageGroupMap messageGroupMap = brokerDestination.getMessageGroupOwners();
assertNotNull(messageGroupMap);
assertTrue(messageGroupMap.getClass().isAssignableFrom(classType));
return messageGroupMap;
}
Aggregations