PolicyEntry pe = new PolicyEntry();
pe.setMemoryLimit(10 * 1024 * 1024);
pe.setOptimizedDispatch(true);
pe.setProducerFlowControl(false);
pe.setExpireMessagesPeriod(1000);
pe.setPendingQueuePolicy(new FilePendingQueueMessageStoragePolicy());
policyMap.put(new ActiveMQQueue(">"), pe);
brokerService.setDestinationPolicy(policyMap);
brokerService.getSystemUsage().getMemoryUsage().setLimit(20 * 1024 * 1024);
brokerService.getSystemUsage().getTempUsage().setLimit(200 * 1024 * 1024);
brokerService.addConnector(ACTIVEMQ_BROKER_BIND);