Package org.apache.activemq.store.kahadb

Examples of org.apache.activemq.store.kahadb.KahaDBStore$StoreTopicTask


    /**
     * Copied from AmqpTestSupport, modified to use persistence
     */
    @Override
    public void createBroker(boolean deleteAllMessages) throws Exception {
        KahaDBStore kaha = new KahaDBStore();
        kaha.setDirectory(new File(KAHADB_DIRECTORY));

        brokerService = new BrokerService();
        brokerService.setDeleteAllMessagesOnStartup(deleteAllMessages);
        brokerService.setPersistent(true);
        brokerService.setPersistenceAdapter(kaha);
View Full Code Here


            int indexBinSize = 1024;
            factory.setIndexMaxBinSize(indexBinSize * 2);
            factory.setIndexBinSize(indexBinSize);
            factory.setIndexPageSize(192 * 20);
        } else {
            KahaDBStore kaha = new KahaDBStore();
            kaha.setDirectory(new File("target/activemq-data/kahadb"));
            // The setEnableJournalDiskSyncs(false) setting is a little dangerous right now, as I have not verified
            // what happens if the index is updated but a journal update is lost.
            // Index is going to be in consistent, but can it be repaired?
            kaha.setEnableJournalDiskSyncs(false);
            // Using a bigger journal file size makes he take fewer spikes as it is not switching files as often.
            kaha.setJournalMaxFileLength(1024*1024*100);
           
            // small batch means more frequent and smaller writes
            kaha.setIndexWriteBatchSize(100);
            // do the index write in a separate thread
            kaha.setEnableIndexWriteAsync(true);
           
            broker.setPersistenceAdapter(kaha);
        }

        broker.addConnector("tcp://localhost:0").setName("Default");
View Full Code Here

TOP

Related Classes of org.apache.activemq.store.kahadb.KahaDBStore$StoreTopicTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.