fix 修复 书写错误

2.X
疯狂的狮子Li 4 months ago
parent f6cf5ab6ca
commit 048e1e3f85

@ -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 {

Loading…
Cancel
Save