Package com.taobao.metamorphosis.client.producer

Examples of com.taobao.metamorphosis.client.producer.MessageProducer.shutdown()


        final MessageProducer producer = this.messageSessionFactory.createProducer();
        assertNotNull(producer);
        assertTrue(producer.getPartitionSelector() instanceof RoundRobinPartitionSelector);
        assertFalse(producer.isOrdered());
        assertTrue(this.messageSessionFactory.getChildren().contains(producer));
        producer.shutdown();
        assertFalse(this.messageSessionFactory.getChildren().contains(producer));
    }


    @Ignore
View Full Code Here


        final MessageProducer producer = this.messageSessionFactory.createProducer(true);
        assertNotNull(producer);
        assertTrue(producer.getPartitionSelector() instanceof RoundRobinPartitionSelector);
        assertTrue(producer.isOrdered());
        assertTrue(this.messageSessionFactory.getChildren().contains(producer));
        producer.shutdown();
        assertFalse(this.messageSessionFactory.getChildren().contains(producer));
    }


    @Test
View Full Code Here

        }
        for (FutureTask<MessageProducer> task : this.producers.values()) {
            try {
                MessageProducer producer = task.get(5000, TimeUnit.MILLISECONDS);
                if (producer != null) {
                    producer.shutdown();
                }
            }
            catch (Exception e) {
                // ignore
            }
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.