PolicyMap destinationPolicyMap = new PolicyMap();
destinationPolicyMap.setDefaultEntry(defaultPolicy);
brokerService.setDestinationPolicy(destinationPolicyMap);
PListStoreImpl tempDataStore = new PListStoreImpl();
tempDataStore.setDirectory(brokerService.getTmpDataDirectory());
tempDataStore.setJournalMaxFileLength(TMP_JOURNAL_MAX_FILE_SIZE);
tempDataStore.setCleanupInterval(TMP_JOURNAL_GC_PERIOD);
tempDataStore.setIndexPageSize(200);
tempDataStore.setIndexEnablePageCaching(false);
brokerService.setTempDataStore(tempDataStore);
brokerService.setAdvisorySupport(false);
TransportConnector tcp = brokerService.addConnector("tcp://localhost:0");
brokerService.start();