Examples of AbortSlowAckConsumerStrategy


Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

    @Override
    protected BrokerService createBroker() throws Exception {
        BrokerService broker = super.createBroker();
        PolicyEntry policy = new PolicyEntry();

        AbortSlowAckConsumerStrategy strategy = (AbortSlowAckConsumerStrategy) underTest;
        strategy.setAbortConnection(abortConnection);
        strategy.setCheckPeriod(checkPeriod);
        strategy.setMaxSlowDuration(maxSlowDuration);
        strategy.setMaxTimeSinceLastAck(maxTimeSinceLastAck);

        policy.setSlowConsumerStrategy(strategy);
        policy.setQueuePrefetch(10);
        policy.setTopicPrefetch(10);
        PolicyMap pMap = new PolicyMap();
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

        return factory;
    }

    @Override
    public void testSlowConsumerIsAbortedViaJmx() throws Exception {
        AbortSlowAckConsumerStrategy strategy = (AbortSlowAckConsumerStrategy) underTest;
        strategy.setMaxTimeSinceLastAck(500); // so jmx does the abort
        super.testSlowConsumerIsAbortedViaJmx();
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

        } catch(Exception ex) {
        }
    }

    public void testIdleConsumerCanBeAbortedNoMessages() throws Exception {
        AbortSlowAckConsumerStrategy strategy = (AbortSlowAckConsumerStrategy) underTest;
        strategy.setIgnoreIdleConsumers(false);

        ActiveMQConnection conn = (ActiveMQConnection) createConnectionFactory().createConnection();
        conn.setExceptionListener(this);
        connections.add(conn);
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

        } catch(Exception ex) {
        }
    }

    public void testIdleConsumerCanBeAborted() throws Exception {
        AbortSlowAckConsumerStrategy strategy = (AbortSlowAckConsumerStrategy) underTest;
        strategy.setIgnoreIdleConsumers(false);

        ActiveMQConnection conn = (ActiveMQConnection) createConnectionFactory().createConnection();
        conn.setExceptionListener(this);
        connections.add(conn);
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

    @Override
    protected BrokerService createBroker() throws Exception {
        BrokerService broker = super.createBroker();
        PolicyEntry policy = new PolicyEntry();

        AbortSlowAckConsumerStrategy strategy = new AbortSlowAckConsumerStrategy();
        strategy.setAbortConnection(abortConnection);
        strategy.setCheckPeriod(checkPeriod);
        strategy.setMaxSlowDuration(maxSlowDuration);
        strategy.setMaxTimeSinceLastAck(maxTimeSinceLastAck);

        policy.setSlowConsumerStrategy(strategy);
        policy.setQueuePrefetch(10);
        policy.setTopicPrefetch(10);
        PolicyMap pMap = new PolicyMap();
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

    @Override
    protected BrokerService createBroker() throws Exception {
        BrokerService broker = super.createBroker();
        PolicyEntry policy = new PolicyEntry();

        AbortSlowAckConsumerStrategy strategy = new AbortSlowAckConsumerStrategy();
        strategy.setAbortConnection(abortConnection);
        strategy.setCheckPeriod(checkPeriod);
        strategy.setMaxSlowDuration(maxSlowDuration);
        strategy.setMaxTimeSinceLastAck(maxTimeSinceLastAck);

        policy.setSlowConsumerStrategy(strategy);
        policy.setQueuePrefetch(10);
        policy.setTopicPrefetch(10);
        PolicyMap pMap = new PolicyMap();
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

        super(isTopic);
    }

    @Override
    protected AbortSlowAckConsumerStrategy createSlowConsumerStrategy() {
        AbortSlowAckConsumerStrategy strategy = new AbortSlowAckConsumerStrategy();
        strategy.setAbortConnection(abortConnection);
        strategy.setCheckPeriod(checkPeriod);
        strategy.setMaxSlowDuration(maxSlowDuration);
        strategy.setMaxTimeSinceLastAck(maxTimeSinceLastAck);

        return strategy;
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.policy.AbortSlowAckConsumerStrategy

        conFactory.setWatchTopicAdvisories(false);
        return conFactory;
    }

    protected AbortSlowAckConsumerStrategy createSlowConsumerStrategy() {
        AbortSlowAckConsumerStrategy strategy = new AbortSlowAckConsumerStrategy();
        strategy.setCheckPeriod(2000);
        strategy.setMaxTimeSinceLastAck(5000);
        strategy.setIgnoreIdleConsumers(false);

        return strategy;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.