protected void configureBroker(BrokerService answer) throws Exception { answer.setPersistent(false); answer.setMonitorConnectionSplits(true); final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>(); final PolicyEntry entry = new PolicyEntry(); entry.setQueue(">"); entry.setMemoryLimit(1024 * 1024 * 100); // Set to 1 MB entry.setOptimizedDispatch(true); entry.setProducerFlowControl(true); entry.setMaxPageSize(10); entry.setLazyDispatch(false); policyEntries.add(entry); final PolicyMap policyMap = new PolicyMap(); policyMap.setPolicyEntries(policyEntries); answer.setDestinationPolicy(policyMap); super.configureBroker(answer); }