caigy commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r972671171


##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int 
transactionCheckMax,
                             }
                         }
 
+                        if 
(BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+                            && 
this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+                            == 
this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+                            && 
this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
+                        ) {
+                            final MessageExtBrokerInner msgInner = 
this.transactionalMessageBridge.renewHalfMessageInner(msgExt);
+                            final boolean isSuccess = 
this.transactionalMessageBridge.escapeMessage(msgInner);
+
+                            if (isSuccess) {
+                                escapeFailCnt = 0;
+                                newOffset = i + 1;
+                                i++;
+                            } else {
+                                System.out.printf("Escaping transactional 
message failed %s times! msgId(offsetId)=%s, UNIQ_KEY(transactionId)=%s",
+                                    escapeFailCnt + 1,
+                                    msgExt.getMsgId(),
+                                    
msgExt.getUserProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX));

Review Comment:
   removed



##########
test/src/test/java/org/apache/rocketmq/test/container/ContainerIntegrationTestBase.java:
##########
@@ -186,6 +187,7 @@ protected static void createTopicTo(BrokerController 
masterBroker, String topicN
         try {
             TopicConfig topicConfig = new TopicConfig(topicName, rqn, wqn, 6, 
0);
             
defaultMQAdminExt.createAndUpdateTopicConfig(masterBroker.getBrokerAddr(), 
topicConfig);
+            System.out.println("Create topic " + topicName + " to " + 
masterBroker.getBrokerIdentity().getCanonicalName() + "@" + 
masterBroker.getBrokerAddr());

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to