Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.ProgressPrinter.increment()


        log.info("Sending "+ PRODUCE_COUNT+" messages that are "+(MESSAGE_SIZE/1024.0)+"k large, for a total of "+(PRODUCE_COUNT*MESSAGE_SIZE/(1024.0*1024.0))+" megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for( int i=0; i < PRODUCE_COUNT; i++) {
            printer.increment();
            BytesMessage  msg = session.createBytesMessage();
            msg.writeBytes(new byte[MESSAGE_SIZE]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();
View Full Code Here


       
        printer = new ProgressPrinter(PRODUCE_COUNT, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for( int i=0; i < PRODUCE_COUNT; i++) {
            printer.increment();
            assertNotNull("Getting message: "+i,consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        log.info("Consumed messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
       
View Full Code Here

        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
                 + " megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(new byte[messageSize]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();
View Full Code Here

        printer = new ProgressPrinter(produceCount, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            assertNotNull("Getting message: " + i, consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

View Full Code Here

        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
                 + " megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(new byte[messageSize]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();
View Full Code Here

        printer = new ProgressPrinter(produceCount, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            assertNotNull("Getting message: " + i, consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

View Full Code Here

        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
                 + " megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(new byte[messageSize]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();
View Full Code Here

        printer = new ProgressPrinter(produceCount, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            assertNotNull("Getting message: " + i, consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.