Examples of VMPendingSubscriberMessageStoragePolicy


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

        service.setUseJmx(false);

        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

    }

    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

        // 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

    final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
    final PolicyEntry entry = new PolicyEntry();
    entry.setQueue(">");
    entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB
    entry.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
    entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
    policyEntries.add(entry);

    // This is to turn of the default behavior of storing topic messages for retroactive consumption
    final PolicyEntry topicPolicyEntry = new PolicyEntry();
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());
        policy.setProducerFlowControl(true);
        policyMap.setDefaultEntry(policy);
        service.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

        // 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

    }

    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

        // 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
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.