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);
}
}
}