File tree Expand file tree Collapse file tree
common/plugin/mq/src/main/java/com/github/cadecode/uniboot/common/plugin/mq/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,10 +25,23 @@ public class TxMsgKit {
2525
2626 private final AbstractTxMsgHandler txMsgTaskHandler ;
2727
28+ /**
29+ * 发送事务消息
30+ * 需要事务
31+ *
32+ * @param txMsg 事务消息
33+ */
2834 public void sendTx (BaseTxMsg txMsg ) {
2935 sendTx (txMsg , null );
3036 }
3137
38+ /**
39+ * 发送事务消息
40+ * 需要事务
41+ *
42+ * @param txMsg 事务消息
43+ * @param msgOption 消息配置
44+ */
3245 public void sendTx (BaseTxMsg txMsg , MsgOption msgOption ) {
3346 MsgOption currOption = txMsgProperties .createMsgOption (msgOption );
3447 txMsgTaskHandler .checkBeforeSend (txMsg , currOption );
@@ -54,4 +67,18 @@ public void afterCompletion(int status) {
5467 }
5568 });
5669 }
70+
71+ /**
72+ * 发送事务消息
73+ * 不检查是否存在事务
74+ *
75+ * @param txMsg 事务消息
76+ * @param msgOption 消息配置
77+ */
78+ public void sendWithoutTx (BaseTxMsg txMsg , MsgOption msgOption ) {
79+ MsgOption currOption = txMsgProperties .createMsgOption (msgOption );
80+ txMsgTaskHandler .checkBeforeSend (txMsg , currOption );
81+ txMsgTaskHandler .saveBeforeRegister (txMsg , currOption );
82+ txMsgTaskHandler .sendCommitted (txMsg , currOption );
83+ }
5784}
You can’t perform that action at this time.
0 commit comments