Package com.aliyun.openservices.ons.api.order

Examples of com.aliyun.openservices.ons.api.order.OrderConsumer


public class ConsumerClient {

    public static void main(String[] args) {
        Properties properties = new Properties();
        properties.put(PropertyKeyConst.ConsumerId, "ConsumerId1");
        OrderConsumer consumer = ONSFactory.createOrderedConsumer(properties);

        consumer.subscribe("TopicTestONS", "*", new MessageOrderListener() {

            @Override
            public OrderAction consume(Message message, ConsumeOrderContext context) {
                System.out.println(message);
                return OrderAction.ConsumeSuccessfully;
            }
        });

        consumer.start();
    }
View Full Code Here

TOP

Related Classes of com.aliyun.openservices.ons.api.order.OrderConsumer

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.