File dataFileDir = new File("target/activemq-data/StoreQueueCursorJournalNoDuplicateTest");
File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);
KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
kahaAdaptor.setDirectory(dataFileDir);
JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, broker.getTaskRunnerFactory());
journalAdaptor.setMaxCheckpointWorkers(1);
broker.setPersistenceAdapter(journalAdaptor);
return broker;