protected Pair<List<RecordInfo>,List<PreparedTransactionInfo>> loadMessageJournal(Configuration config) throws Exception {
  JournalImpl messagesJournal=null;
  try {
    SequentialFileFactory messagesFF=new NIOSequentialFileFactory(new File(getJournalDir()),null,1);
    messagesJournal=new JournalImpl(config.getJournalFileSize(),config.getJournalMinFiles(),config.getJournalPoolFiles(),0,0,messagesFF,"activemq-data","amq",1);
    final List<RecordInfo> committedRecords=new LinkedList<>();
    final List<PreparedTransactionInfo> preparedTransactions=new LinkedList<>();
    messagesJournal.start();
    messagesJournal.load(committedRecords,preparedTransactions,null,false);
    return new Pair<>(committedRecords,preparedTransactions);
  }
  finally {
    try {
      if (messagesJournal != null) {
        messagesJournal.stop();
      }
    }
 catch (    Throwable ignored) {
    }
  }
}

protected Pair < List < RecordInfo > , List < PreparedTransactionInfo > > loadMessageJournal ( Configuration config ) throws Exception { JournalImpl messagesJournal = null ; try { SequentialFileFactory messagesFF = new NIOSequentialFileFactory ( new File ( getJournalDir ( ) ) , null , 1 ) ; messagesJournal = new JournalImpl ( config . getJournalFileSize ( ) , config . getJournalMinFiles ( ) , config . getJournalPoolFiles ( ) , 0 , 0 , messagesFF , "activemq-data" , "amq" , 1 ) ; final List < RecordInfo > committedRecords = new LinkedList < > ( ) ; final List < PreparedTransactionInfo > preparedTransactions = new LinkedList < > ( ) ; messagesJournal . start ( ) ; messagesJournal . load ( committedRecords , preparedTransactions , null , false ) ; return new Pair < > ( committedRecords , preparedTransactions ) ; } finally { try { if ( messagesJournal != null ) { messagesJournal . stop ( ) ; } } catch ( Throwable ignored ) { } } }
reads a journal system and returns a map < integer , atomicinteger > of recordtypes and the number of records per type , independent of being deleted or not
