Skip to content

Commit

Permalink
end if msg null
Browse files Browse the repository at this point in the history
  • Loading branch information
Bughue committed Dec 3, 2024
1 parent 4b57746 commit a5395aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public boolean commit(BusinessActionContext context)
Message message = context.getActionContext(ROCKET_MSG_KEY, Message.class);
SendResult sendResult = context.getActionContext(ROCKET_SEND_RESULT_KEY, SendResult.class);
if (checkMqStatus(message, sendResult)) {
throw new TransactionException("TCCRocketMQ commit but cannot find message and sendResult");
throw new TransactionException("TCCRocketMQ commit but cannot find message or sendResult");
}
this.producerImpl.endTransaction(message, sendResult, LocalTransactionState.COMMIT_MESSAGE, null);
LOGGER.info("RocketMQ message send commit, xid = {}, branchId = {}", context.getXid(), context.getBranchId());
Expand All @@ -88,7 +88,7 @@ public boolean rollback(BusinessActionContext context)
Message message = context.getActionContext(ROCKET_MSG_KEY, Message.class);
SendResult sendResult = context.getActionContext(ROCKET_SEND_RESULT_KEY, SendResult.class);
if (checkMqStatus(message, sendResult)) {
LOGGER.error("TCCRocketMQ rollback but cannot find message and sendResult");
LOGGER.error("TCCRocketMQ rollback but cannot find message or sendResult");
return true;
}
this.producerImpl.endTransaction(message, sendResult, LocalTransactionState.ROLLBACK_MESSAGE, null);
Expand Down

0 comments on commit a5395aa

Please sign in to comment.