Package com.taobao.metamorphosis.client.extension

Examples of com.taobao.metamorphosis.client.extension.BroadcastMessageSessionFactory


*/

public class BroadcastAsyncConsumer {
    public static void main(final String[] args) throws Exception {
        // New session factory,ǿ�ҽ���ʹ�õ���
        final BroadcastMessageSessionFactory sessionFactory = new MetaBroadcastMessageSessionFactory(initMetaConfig());

        // subscribed topic
        final String topic = "meta-test";
        // consumer group
        final String group = "meta-example";
        // create consumer,ǿ�ҽ���ʹ�õ���
        final MessageConsumer consumer = sessionFactory.createBroadcastConsumer(new ConsumerConfig(group));
        // subscribe topic
        consumer.subscribe(topic, 1024 * 1024, new MessageListener() {

            @Override
            public void recieveMessages(final Message message) {
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.client.extension.BroadcastMessageSessionFactory

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.