Skip to content

Commit 8ef8baa

Browse files
committed
feat: 添加发送 TxMsg 前校验参数的方法
1 parent bde17d6 commit 8ef8baa

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

common/plugin/mq/src/main/java/com/github/cadecode/uniboot/common/plugin/mq/handler/AbstractTxMsgHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public abstract class AbstractTxMsgHandler {
1919

2020
public abstract void doClear(Long autoClearInterval);
2121

22+
public abstract void checkBeforeSend(BaseTxMsg txMsg, MsgOption msgOption);
23+
2224
public abstract void sendNoTransaction(BaseTxMsg txMsg, MsgOption msgOption);
2325

2426
public abstract void sendNotCommit(BaseTxMsg txMsg, MsgOption msgOption);

common/plugin/mq/src/main/java/com/github/cadecode/uniboot/common/plugin/mq/util/TxMsgKit.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public void sendTx(BaseTxMsg txMsg) {
3030
}
3131

3232
public void sendTx(BaseTxMsg txMsg, MsgOption msgOption) {
33+
txMsgTaskHandler.checkBeforeSend(txMsg, msgOption);
3334
MsgOption currOption = txMsgProperties.createMsgOption(msgOption);
3435
// 若没有事务
3536
if (!TransactionSynchronizationManager.isActualTransactionActive()) {

0 commit comments

Comments
 (0)