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


##########
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",

Review Comment:
   better to remove stdout. 



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