broker.setPersistent(true);
broker.setUseJmx(true);
broker.setAdvisorySupport(false);
broker.setDeleteAllMessagesOnStartup(true);
AMQPersistenceAdapter persistence = new AMQPersistenceAdapter();
persistence.setSyncOnWrite(false);
File directory = new File("target" + File.separator + "activemq-data");
persistence.setDirectory(directory);
File tmpDir = new File(directory, "tmp");
IOHelper.deleteChildren(tmpDir);
Store tempStore = new org.apache.activemq.kaha.impl.KahaStore(tmpDir, "rw");
SystemUsage sysUsage = new SystemUsage("mySysUsage", persistence, tempStore);