Skip to content

Commit

Permalink
opt
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes committed Feb 2, 2023
1 parent c22aea7 commit 6a85838
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tcc/src/main/java/io/seata/rm/tcc/rocketmq/RocketMQUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ public static SendResult halfSend(DefaultMQProducer defaultMQProducer,

MessageAccessor.putProperty(msg, MessageConst.PROPERTY_TRANSACTION_PREPARED, "true");
MessageAccessor.putProperty(msg, MessageConst.PROPERTY_PRODUCER_GROUP, defaultMQProducer.getProducerGroup());
DefaultMQProducerImpl defaultMQProducerImpl = defaultMQProducer.getDefaultMQProducerImpl();
SendResult sendResult = null;
SendResult sendResult;
try {
sendResult = defaultMQProducerImpl.send(msg);
sendResult = defaultMQProducer.send(msg);
} catch (Exception e) {
throw new MQClientException("send message Exception", e);
}

LocalTransactionState localTransactionState = LocalTransactionState.UNKNOW;
switch (sendResult.getSendStatus()) {
case SEND_OK: {
if (sendResult.getTransactionId() != null) {
Expand Down

0 comments on commit 6a85838

Please sign in to comment.