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

Examples of com.aliyun.openservices.ons.api.order.OrderProducer.send()


        Message msg = new Message(//
            "TopicTestONS", // Topic, 请向MetaQ运维人员申请
            "TagA", // Tag, 相当于子Topic概念,应用可以自由设置,Consumer消费时,可以通过他来过滤消息
            "Hello ONS".getBytes()// 消息内容,二进制形式
                );
        SendResult sendResult = producer.send(msg, new MessageQueueSelector() {

            @Override
            public int select(int queueTotal, Message msg, Object arg) {
                int value = Math.abs(arg.hashCode());
                if (value < 0) {
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.