Search in sources :

Example 1 with PendingQueueMessageStoragePolicy

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

the class DestinationCursorConfigTest method testQueueConfiguration.

public void testQueueConfiguration() throws Exception {
    super.topic = false;
    ActiveMQDestination destination = (ActiveMQDestination) createDestination("org.apache.foo");
    PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
    PendingQueueMessageStoragePolicy policy = entry.getPendingQueuePolicy();
    assertNotNull(policy);
    assertTrue("Policy is: " + policy, policy instanceof VMPendingQueueMessageStoragePolicy);
}
Also used : VMPendingQueueMessageStoragePolicy(org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy) VMPendingQueueMessageStoragePolicy(org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy) PendingQueueMessageStoragePolicy(org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy) PolicyEntry(org.apache.activemq.broker.region.policy.PolicyEntry) ActiveMQDestination(org.apache.activemq.command.ActiveMQDestination)

Example 2 with PendingQueueMessageStoragePolicy

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

the class QueuePurgeTest method applyBrokerSpoolingPolicy.

private void applyBrokerSpoolingPolicy() {
    PolicyMap policyMap = new PolicyMap();
    PolicyEntry defaultEntry = new PolicyEntry();
    defaultEntry.setProducerFlowControl(false);
    PendingQueueMessageStoragePolicy pendingQueuePolicy = new FilePendingQueueMessageStoragePolicy();
    defaultEntry.setPendingQueuePolicy(pendingQueuePolicy);
    policyMap.setDefaultEntry(defaultEntry);
    broker.setDestinationPolicy(policyMap);
}
Also used : PolicyMap(org.apache.activemq.broker.region.policy.PolicyMap) FilePendingQueueMessageStoragePolicy(org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy) PendingQueueMessageStoragePolicy(org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy) FilePendingQueueMessageStoragePolicy(org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy) PolicyEntry(org.apache.activemq.broker.region.policy.PolicyEntry)

Aggregations

PendingQueueMessageStoragePolicy (org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy)2 PolicyEntry (org.apache.activemq.broker.region.policy.PolicyEntry)2 FilePendingQueueMessageStoragePolicy (org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy)1 PolicyMap (org.apache.activemq.broker.region.policy.PolicyMap)1 VMPendingQueueMessageStoragePolicy (org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy)1 ActiveMQDestination (org.apache.activemq.command.ActiveMQDestination)1