Package com.taobao.metamorphosis.client.extension.producer.MessageRecoverManager

Examples of com.taobao.metamorphosis.client.extension.producer.MessageRecoverManager.MessageRecoverer


        Assert.assertTrue(this.localMessageStorageManager.getMessageCount(topic2, this.partition1) == 1);

        final BlockingQueue<Message> queue1 = new ArrayBlockingQueue<Message>(10);
        final BlockingQueue<Message> queue2 = new ArrayBlockingQueue<Message>(10);

        final MessageRecoverer recoverer1 = this.createRecover(topic1, queue1);
        final MessageRecoverer recoverer2 = this.createRecover(topic2, queue2);

        this.localMessageStorageManager.recover(topic1, this.partition1, recoverer1);
        // again,no problem
        this.localMessageStorageManager.recover(topic1, this.partition1, recoverer1);
        this.localMessageStorageManager.recover(topic1, this.partition2, recoverer1);
View Full Code Here


    }


    private MessageRecoverer createRecover(final String topic, final BlockingQueue<Message> queue) {
        final MessageRecoverer recoverer1 = new MessageRecoverer() {

            @Override
            public void handle(final Message msg) throws Exception {
                Assert.assertEquals(topic, msg.getTopic());
                Assert.assertEquals("hello", new String(msg.getData()));
View Full Code Here

    IMocksControl mocksControl;


    @Before
    public void setUp() throws Exception {
        processor = new AsyncIgnoreMessageProcessor(new MetaClientConfig(), new MessageRecoverer() {

            @Override
            public void handle(Message msg) throws Exception {

            }
View Full Code Here

    }


    @Test
    public void testAsyncIgnoreMessageProcessor() {
        new AsyncIgnoreMessageProcessor(new MetaClientConfig(), new MessageRecoverer() {

            @Override
            public void handle(Message msg) throws Exception {

            }
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.client.extension.producer.MessageRecoverManager.MessageRecoverer

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.