RongtongJin commented on code in PR #9549:
URL: https://github.com/apache/rocketmq/pull/9549#discussion_r2350406712
##########
broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:
##########
@@ -1834,6 +1846,20 @@ public void run() {
}
}
}, 10, 5, TimeUnit.SECONDS);
+
+ if (this.routeEventService != null && this.topicConfigManager != null)
{
+ Set<String> topics =
this.topicConfigManager.getTopicConfigTable().keySet();
+
+ for (String topic : topics) {
+ try {
+ this.routeEventService.publishEvent(RouteEventType.START,
topic);
+ LOG.info("[START]: publish {}", topic);
+ } catch (Exception e) {
+ LOG.error("Failed to publish route change event for topic:
{}", topic, e);
+ }
+ }
+ LOG.info("Published route change events for {} topics",
topics.size());
+ }
Review Comment:
如果启动事件也要一个个通知的话,topic数量级百万情况下,量会很大
--
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]