Package org.apache.activemq.store.kahadb

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


        return answer;
    }

    protected void configureBroker(BrokerService answer) throws Exception {
        File dataFileDir = new File("target/test-amq-data/bugs/AMQ2356/kahadb");
        KahaDBStore kaha = new KahaDBStore();
        kaha.setDirectory(dataFileDir);
        answer.setUseJmx(false);
     // Setup a destination policy where it takes only 1 message at a time.
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry policy = new PolicyEntry();
        policy.setOptimizedDispatch(true);
View Full Code Here


    protected void configureBroker(BrokerService answer,String uri) throws Exception {
        File dataFileDir = new File("target/test-amq-data/perfTest/amqdb");
        dataFileDir.mkdirs();
        // answer.setDeleteAllMessagesOnStartup(true);
              
         KahaDBStore adaptor = new KahaDBStore();
         adaptor.setDirectory(dataFileDir);
        
       
        answer.setDataDirectoryFile(dataFileDir);
        answer.setPersistenceAdapter(adaptor);
        answer.addConnector(uri);
View Full Code Here

    protected int messageSize = 1024 * 4;

    protected BrokerService createBroker() throws Exception {
        BrokerService broker = new BrokerService();
        KahaDBStore kaha = new KahaDBStore();
        kaha.setDirectory(new File("target/activemq-data/kahadb"));
        // kaha.deleteAllMessages();
        broker.setPersistenceAdapter(kaha);
        broker.addConnector("tcp://localhost:0");
        return broker;
    }
View Full Code Here

    protected void configureBroker(BrokerService answer,String uri) throws Exception {
        File dataFileDir = new File("target/test-amq-data/perfTest/amqdb");
        dataFileDir.mkdirs();
        answer.setDeleteAllMessagesOnStartup(true);
              
         KahaDBStore adaptor = new KahaDBStore();
         adaptor.setDirectory(dataFileDir);
        
       
        answer.setDataDirectoryFile(dataFileDir);
        answer.setPersistenceAdapter(adaptor);
        answer.addConnector(uri);
View Full Code Here

    protected void configureBroker(BrokerService answer,String uri) throws Exception {

        File dataFileDir = new File("target/test-amq-data/perfTest/kahadb");

        KahaDBStore kaha = new KahaDBStore();
        kaha.setDirectory(dataFileDir);

        // 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*100);
       
        // small batch means more frequent and smaller writes
        kaha.setIndexWriteBatchSize(100);
        // do the index write in a separate thread
        kaha.setEnableIndexWriteAsync(true);
       
        answer.setPersistenceAdapter(kaha);
        answer.addConnector(uri);
        answer.setDeleteAllMessagesOnStartup(true);

View Full Code Here

    }

    protected void configureBroker(BrokerService answer) throws Exception {
        File dataFileDir = new File("target/test-amq-data/perfTest/kahadb");

        KahaDBStore kaha = new KahaDBStore();
        kaha.setDirectory(dataFileDir);
        //answer.setUseJmx(false);

        // 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?
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        broker = new BrokerService();
        broker.addConnector("tcp://localhost:61616");
        KahaDBStore store = new KahaDBStore();
        store.setDirectory(new File("data"));
        broker.setPersistenceAdapter(store);
        broker.start();

        mbeanServer = ManagementFactory.getPlatformMBeanServer();
    }
View Full Code Here

public class IDERunner {

    public static void main(String[]args) throws Exception {
        BrokerService bs = new BrokerService();
        bs.addConnector("mqtt://0.0.0.0:1883?trace=true");
        KahaDBStore store = new KahaDBStore();
        store.setDirectory(new File("target/activemq-data/kahadb"));
        bs.setPersistenceAdapter(store);
        bs.deleteAllMessages();
        bs.start();
        bs.waitUntilStopped();
    }
View Full Code Here

public class IDERunner {

    public static void main(String[]args) throws Exception {
        BrokerService bs = new BrokerService();
        bs.addConnector("amqp://0.0.0.0:5672?trace=true");
        KahaDBStore store = new KahaDBStore();
        store.setDirectory(new File("target/activemq-data/kahadb"));
        bs.setPersistenceAdapter(store);
        bs.deleteAllMessages();
        bs.start();
        bs.waitUntilStopped();
    }
View Full Code Here

        return broker;
    }

    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
        File dataFileDir = new File("target/test-amq-data/kahadb/" + broker.getBrokerName());
        KahaDBStore kaha = new KahaDBStore();
        kaha.setDirectory(dataFileDir);
        broker.setPersistenceAdapter(kaha);
    }
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.