Package com.taobao.metamorphosis.client.producer

Examples of com.taobao.metamorphosis.client.producer.XAMessageProducer.sendMessage()


                final Message msg = new Message(topic, data);
                final XAResource xares = messageProducer.getXAResource();
                final Xid xid =
                        XIDGenerator.createXID(this.formatIdIdGenerator.incrementAndGet(), this.UNIQUE_QUALIFIER);
                xares.start(xid, XAResource.TMNOFLAGS);
                final SendResult result = messageProducer.sendMessage(msg);
                if (!result.isSuccess() || i % 2 == 0) {
                    xares.end(xid, XAResource.TMFAIL);
                    xares.rollback(xid);
                }
                else {
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.