Examples of VMPendingQueueMessageStoragePolicy


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

    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();
    topicPolicyEntry.setTopic(">");
View Full Code Here

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

        adaptor.setForceRecoverReferenceStore(true);
        broker.setPersistenceAdapter(adaptor);
       
        PolicyEntry defaultPolicy = new PolicyEntry();
        if (useVMCursor) {
            defaultPolicy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
        }
        defaultPolicy.setExpireMessagesPeriod(expireMessagesPeriod);
        defaultPolicy.setMaxExpirePageSize(1200);
        PolicyMap policyMap = new PolicyMap();
        policyMap.setDefaultEntry(defaultPolicy);
View Full Code Here

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

        broker.addConnector("tcp://0.0.0.0:2401");
        PolicyMap policies = new PolicyMap();
        PolicyEntry entry = new PolicyEntry();
        entry.setMemoryLimit(1024 * 100);
        entry.setProducerFlowControl(true);
        entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
        entry.setQueue(">");
        policies.setDefaultEntry(entry);
        broker.setDestinationPolicy(policies);
        broker.start();
        broker.waitUntilStarted();
View Full Code Here

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

        broker.waitUntilStarted();
    }
   
    public void initCombosForTestExpiredMessagesWithNoConsumer() {
        addCombinationValues("optimizedDispatch", new Object[] {Boolean.TRUE, Boolean.FALSE});
        addCombinationValues("pendingQueuePolicy", new Object[] {null, new VMPendingQueueMessageStoragePolicy(), new FilePendingQueueMessageStoragePolicy()});
    }
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.