Search in sources :

Example 1 with FixedCountSubscriptionRecoveryPolicy

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

the class BrokerTestSupport method getDefaultPolicy.

protected PolicyEntry getDefaultPolicy() {
    PolicyEntry policy = new PolicyEntry();
    policy.setDispatchPolicy(new RoundRobinDispatchPolicy());
    policy.setSubscriptionRecoveryPolicy(new FixedCountSubscriptionRecoveryPolicy());
    return policy;
}
Also used : FixedCountSubscriptionRecoveryPolicy(org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy) RoundRobinDispatchPolicy(org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy) PolicyEntry(org.apache.activemq.broker.region.policy.PolicyEntry)

Example 2 with FixedCountSubscriptionRecoveryPolicy

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

the class SimpleDispatchPolicyTest method createBroker.

@Override
protected BrokerService createBroker() throws Exception {
    BrokerService broker = super.createBroker();
    PolicyEntry policy = new PolicyEntry();
    policy.setDispatchPolicy(new SimpleDispatchPolicy());
    policy.setSubscriptionRecoveryPolicy(new FixedCountSubscriptionRecoveryPolicy());
    PolicyMap pMap = new PolicyMap();
    pMap.setDefaultEntry(policy);
    broker.setDestinationPolicy(pMap);
    return broker;
}
Also used : PolicyMap(org.apache.activemq.broker.region.policy.PolicyMap) SimpleDispatchPolicy(org.apache.activemq.broker.region.policy.SimpleDispatchPolicy) FixedCountSubscriptionRecoveryPolicy(org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy) BrokerService(org.apache.activemq.broker.BrokerService) PolicyEntry(org.apache.activemq.broker.region.policy.PolicyEntry)

Aggregations

FixedCountSubscriptionRecoveryPolicy (org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy)2 PolicyEntry (org.apache.activemq.broker.region.policy.PolicyEntry)2 BrokerService (org.apache.activemq.broker.BrokerService)1 PolicyMap (org.apache.activemq.broker.region.policy.PolicyMap)1 RoundRobinDispatchPolicy (org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy)1 SimpleDispatchPolicy (org.apache.activemq.broker.region.policy.SimpleDispatchPolicy)1