Examples of ackMessages()


Examples of com.netflix.astyanax.recipes.queue.MessageConsumer.ackMessages()

        printMessages("Pending messages after consume TIMEOUT " + key, queue.peekMessagesByKey(key));
//        Assert.assertEquals(2, m2a.size());

        LOG.info("*** Acking both messages ***");
        consumer.ackMessages(m1);
        consumer.ackMessages(m2);

        printMessages("Pending messages after both acks " + key, queue.peekMessagesByKey(key));
//        Assert.assertEquals(2, m2a.size());

View Full Code Here

Examples of com.netflix.astyanax.recipes.queue.MessageConsumer.ackMessages()

        printMessages("Pending messages after consume TIMEOUT " + key, queue.peekMessagesByKey(key));
//        Assert.assertEquals(2, m2a.size());

        LOG.info("*** Acking both messages ***");
        consumer.ackMessages(m1);
        consumer.ackMessages(m2);

        printMessages("Pending messages after both acks " + key, queue.peekMessagesByKey(key));
//        Assert.assertEquals(2, m2a.size());

        // Consume anything that is in the queue
View Full Code Here

Examples of com.netflix.astyanax.recipes.queue.MessageConsumer.ackMessages()

        printMessages("Consuming messages", m3);
        Assert.assertEquals(1, m3.size());

        printMessages("Pending messages after 2nd consume " + key, queue.peekMessagesByKey(key));

        consumer.ackMessages(m3);

        Thread.sleep(2000);

        final List<MessageContext> m4 = consumer.readMessages(10);
        printMessages("Consuming messages", m4);
View Full Code Here

Examples of com.netflix.astyanax.recipes.queue.MessageConsumer.ackMessages()

            Assert.assertEquals(1, m5.size());

            long systemtime = System.currentTimeMillis();
            MessageContext m = Iterables.getFirst(m5, null);
            LOG.info("MessageTime: " + (systemtime - m.getMessage().getTrigger().getTriggerTime()));
            consumer.ackMessages(m5);
        }
    }

    private <T> void printMessages(String caption, List<T> messages) {
        LOG.info(caption + "(" + messages.size() + ")");
View Full Code Here

Examples of com.netflix.astyanax.recipes.queue.MessageConsumer.ackMessages()

            LOG.info("Read message: " + lm2);
            Assert.assertEquals(1, lm2.size());
            LOG.info(lm2.toString());
            Assert.assertEquals(1, scheduler.getMessageCount());

            consumer.ackMessages(lm2);
            Assert.assertEquals(0, scheduler.getMessageCount());
        }

        {
            final Message m = new Message()
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.