// variants for each store....
 protected void configureBroker(BrokerService broker) throws Exception {
   KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter();
   persistenceAdapter.setDirectory(
       new File(
           "target/activemq-data/kahadb/" + broker.getBrokerName() + "NetworBrokerDetatchTest"));
   broker.setPersistenceAdapter(persistenceAdapter);
 }
  protected void configurePersistence(BrokerService brokerService) throws Exception {
    adapter = (KahaDBPersistenceAdapter) brokerService.getPersistenceAdapter();

    // ensure there are a bunch of data files but multiple entries in each
    adapter.setJournalMaxFileLength(1024 * 20);

    // speed up the test case, checkpoint an cleanup early and often
    adapter.setCheckpointInterval(5000);
    adapter.setCleanupInterval(5000);

    adapter.setCheckForCorruptJournalFiles(true);
    adapter.setIgnoreMissingJournalfiles(true);
  }
  @Override
  protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
    // setup multi-kaha adapter
    MultiKahaDBPersistenceAdapter persistenceAdapter = new MultiKahaDBPersistenceAdapter();
    persistenceAdapter.setDirectory(dataFileDir.getRoot());

    KahaDBPersistenceAdapter kahaStore = new KahaDBPersistenceAdapter();
    if (useTopic) {
      kahaStore.setConcurrentStoreAndDispatchTopics(concurrentDispatch);
    } else {
      kahaStore.setConcurrentStoreAndDispatchQueues(concurrentDispatch);
    }

    FilteredKahaDBPersistenceAdapter filtered = new FilteredKahaDBPersistenceAdapter();
    filtered.setPersistenceAdapter(kahaStore);
    filtered.setPerDestination(false);
    List<FilteredKahaDBPersistenceAdapter> stores = new ArrayList<>();
    stores.add(filtered);

    persistenceAdapter.setFilteredPersistenceAdapters(stores);
    broker.setPersistenceAdapter(persistenceAdapter);
  }