Bläddra i källkod

fix 修复 书写错误

疯狂的狮子Li 1 år sedan
förälder
incheckning
048e1e3f85

+ 2 - 2
ruoyi-example/ruoyi-test-mq/src/main/java/org/dromara/stream/producer/TransactionRocketProducer.java

@@ -28,8 +28,8 @@ public class TransactionRocketProducer {
         List<String> tags = Arrays.asList("TAG-1", "TAG-2", "TAG-3");
         for (int i = 0; i < 3; i++) {
             Message<String> message = MessageBuilder.withPayload("===>事务消息-" + i).build();
-            //destination formats: `topicName:tags` message – message Message arg – ext arg
-            TransactionSendResult res = rocketMQTemplate.sendMessageInTransaction("transaction_topic:" + tags.get(i), message, i + 1);
+            // destination formats: `topicName:tags` message – message Message arg – ext arg
+            TransactionSendResult res = rocketMQTemplate.sendMessageInTransaction("transaction-topic:" + tags.get(i), message, i + 1);
             if (res.getLocalTransactionState().equals(LocalTransactionState.COMMIT_MESSAGE) && res.getSendStatus().equals(SendStatus.SEND_OK)) {
                 log.info("【生产者】事物消息发送成功;成功结果:{}", res);
             } else {