Package com.taobao.metamorphosis.client.producer

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


                if (!producer.sendMessage(new Message(topic, line.getBytes())).isSuccess()) {
                    producer.rollback();
                    continue;
                }
                // �ύ
                producer.commit();

            }
            catch (final Exception e) {
                producer.rollback();
            }
View Full Code Here


                final SendResult result = messageProducer.sendMessage(msg);
                if (!result.isSuccess()) {
                    messageProducer.rollback();
                    throw new RuntimeException("Send message failed:" + result.getErrorMessage());
                }
                messageProducer.commit();
                this.messages.add(msg);
            }
        }
    }
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.