Search in sources :

Example 1 with DiscardingDeadLetterStrategy

use of org.apache.activemq.broker.region.policy.DiscardingDeadLetterStrategy in project activemq-artemis by apache.

the class DiscardingDeadLetterPolicyTest method createBroker.

@Override
protected BrokerService createBroker() throws Exception {
    BrokerService broker = super.createBroker();
    PolicyEntry policy = new PolicyEntry();
    DeadLetterStrategy strategy = new DiscardingDeadLetterStrategy();
    strategy.setProcessNonPersistent(true);
    policy.setDeadLetterStrategy(strategy);
    PolicyMap pMap = new PolicyMap();
    pMap.setDefaultEntry(policy);
    broker.setDestinationPolicy(pMap);
    return broker;
}
Also used : PolicyMap(org.apache.activemq.broker.region.policy.PolicyMap) DeadLetterStrategy(org.apache.activemq.broker.region.policy.DeadLetterStrategy) DiscardingDeadLetterStrategy(org.apache.activemq.broker.region.policy.DiscardingDeadLetterStrategy) DiscardingDeadLetterStrategy(org.apache.activemq.broker.region.policy.DiscardingDeadLetterStrategy) BrokerService(org.apache.activemq.broker.BrokerService) PolicyEntry(org.apache.activemq.broker.region.policy.PolicyEntry)

Aggregations

BrokerService (org.apache.activemq.broker.BrokerService)1 DeadLetterStrategy (org.apache.activemq.broker.region.policy.DeadLetterStrategy)1 DiscardingDeadLetterStrategy (org.apache.activemq.broker.region.policy.DiscardingDeadLetterStrategy)1 PolicyEntry (org.apache.activemq.broker.region.policy.PolicyEntry)1 PolicyMap (org.apache.activemq.broker.region.policy.PolicyMap)1