RongtongJin commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r974793686
##########
broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:
##########
@@ -112,15 +113,21 @@ public PutMessageResult putMessage(MessageExtBrokerInner
messageExt) {
}
private SendResult putMessageToRemoteBroker(MessageExtBrokerInner
messageExt) {
- final TopicPublishInfo topicPublishInfo =
this.brokerController.getTopicRouteInfoManager().tryToFindTopicPublishInfo(messageExt.getTopic());
+ final boolean isTransHalfMessage =
TransactionalMessageUtil.buildHalfTopic().equals(messageExt.getTopic());
+ MessageExtBrokerInner messageToPut = messageExt;
+ if (isTransHalfMessage) {
+ messageToPut =
TransactionalMessageUtil.buildTransactionalMessageFromHalfMessage(messageExt);
+ }
Review Comment:
How about moving this logic to the upper layer to make
putMessageToRemoteBroker function purer?
--
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]