Examples of VMPendingSubscriberMessageStoragePolicy


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

        // Setup a destination policy where it takes only 1 message at a time.
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry policy = new PolicyEntry();
        policy.setMemoryLimit(1);
        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
        policy.setProducerFlowControl(true);
        policyMap.setDefaultEntry(policy);
        service.setDestinationPolicy(policyMap);
View Full Code Here

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

        // Setup a destination policy where it takes only 1 message at a time.
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry policy = new PolicyEntry();
        policy.setMemoryLimit(1);
        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
        policyMap.setDefaultEntry(policy);
        service.setDestinationPolicy(policyMap);

        connector = service.addConnector("tcp://localhost:0");
View Full Code Here

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

    }

    protected PolicyEntry getDefaultPolicy() {
        PolicyEntry policy = super.getDefaultPolicy();
        // disable spooling
        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
        return policy;
    }
View Full Code Here

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

        // on the master connector
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry policy = new PolicyEntry();
        // don't apply the same memory limit as the master in this case
        //policy.setMemoryLimit(10);
        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
        policy.setProducerFlowControl(true);
        policyMap.setDefaultEntry(policy);
       
        slave.setDestinationPolicy(policyMap);
View Full Code Here

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

        doTestMessageEvictionMemoryUsage();
    }
   
    @Test
    public void testMessageEvictionMemoryUsageVmCursor() throws Exception {
        setUp(new VMPendingSubscriberMessageStoragePolicy());
        doTestMessageEvictionMemoryUsage();
    }
View Full Code Here

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

        doTestMessageEvictionMemoryUsage();
    }
   
    @Test
    public void testMessageEvictionDiscardedAdvisory() throws Exception {
        setUp(new VMPendingSubscriberMessageStoragePolicy());
       
        ExecutorService executor = Executors.newSingleThreadExecutor();
        final CountDownLatch consumerRegistered = new CountDownLatch(1);
        final CountDownLatch gotAdvisory = new CountDownLatch(1);
        final CountDownLatch advisoryIsGood = new CountDownLatch(1);
View Full Code Here

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

        // on the master connector
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry policy = new PolicyEntry();
        // don't apply the same memory limit as the master in this case
        //policy.setMemoryLimit(10);
        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
        policy.setProducerFlowControl(true);
        policyMap.setDefaultEntry(policy);
       
        slave.setDestinationPolicy(policyMap);
View Full Code Here

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

    }

    protected PolicyEntry getDefaultPolicy() {
        PolicyEntry policy = super.getDefaultPolicy();
        // disable spooling
        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
        // have aggressive expiry period to ensure no deadlock or clash
        policy.setExpireMessagesPeriod(100);
       
        return policy;
    }
View Full Code Here

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

        doTestMessageEvictionMemoryUsage();
    }

    @Test
    public void testMessageEvictionMemoryUsageVmCursor() throws Exception {
        setUp(new VMPendingSubscriberMessageStoragePolicy());
        doTestMessageEvictionMemoryUsage();
    }
View Full Code Here

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

        doTestMessageEvictionMemoryUsage();
    }

    @Test
    public void testMessageEvictionDiscardedAdvisory() throws Exception {
        setUp(new VMPendingSubscriberMessageStoragePolicy());

        ExecutorService executor = Executors.newSingleThreadExecutor();
        final CountDownLatch consumerRegistered = new CountDownLatch(1);
        final CountDownLatch gotAdvisory = new CountDownLatch(1);
        final CountDownLatch advisoryIsGood = new CountDownLatch(1);
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.