Search in sources :

Example 1 with MessageGroupMap

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;
}
Also used : SimpleMessageGroupMap(org.apache.activemq.broker.region.group.SimpleMessageGroupMap) MessageGroupMap(org.apache.activemq.broker.region.group.MessageGroupMap) CachedMessageGroupMap(org.apache.activemq.broker.region.group.CachedMessageGroupMap) PolicyMap(org.apache.activemq.broker.region.policy.PolicyMap) BrokerService(org.apache.activemq.broker.BrokerService) PolicyEntry(org.apache.activemq.broker.region.policy.PolicyEntry) Queue(org.apache.activemq.broker.region.Queue) ActiveMQDestination(org.apache.activemq.command.ActiveMQDestination)

Aggregations

BrokerService (org.apache.activemq.broker.BrokerService)1 Queue (org.apache.activemq.broker.region.Queue)1 CachedMessageGroupMap (org.apache.activemq.broker.region.group.CachedMessageGroupMap)1 MessageGroupMap (org.apache.activemq.broker.region.group.MessageGroupMap)1 SimpleMessageGroupMap (org.apache.activemq.broker.region.group.SimpleMessageGroupMap)1 PolicyEntry (org.apache.activemq.broker.region.policy.PolicyEntry)1 PolicyMap (org.apache.activemq.broker.region.policy.PolicyMap)1 ActiveMQDestination (org.apache.activemq.command.ActiveMQDestination)1