You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/18 02:36:02 UTC

[GitHub] [rocketmq] RongtongJin commented on a diff in pull request #4834: [ISSUE #4832] Remove innerProducer and innerConsumer in EscapeBridge

RongtongJin commented on code in PR #4834:
URL: https://github.com/apache/rocketmq/pull/4834#discussion_r948594436


##########
broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:
##########
@@ -63,44 +96,52 @@ public void start() throws Exception {
         if (brokerController.getBrokerConfig().isEnableSlaveActingMaster() && brokerController.getBrokerConfig().isEnableRemoteEscape()) {
             String nameserver = this.brokerController.getNameServerList();
             if (nameserver != null && !nameserver.isEmpty()) {

Review Comment:
   The nameserver condition no longer seems necessary



##########
broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:
##########
@@ -63,44 +96,52 @@ public void start() throws Exception {
         if (brokerController.getBrokerConfig().isEnableSlaveActingMaster() && brokerController.getBrokerConfig().isEnableRemoteEscape()) {
             String nameserver = this.brokerController.getNameServerList();
             if (nameserver != null && !nameserver.isEmpty()) {
-                startInnerProducer(nameserver);
-                startInnerConsumer(nameserver);
-                LOG.info("start inner producer and consumer success.");
+                this.defaultAsyncSenderExecutor = new ForkJoinPool(Runtime.getRuntime().availableProcessors(),
+                        new NamedForkJoinWorkerThreadFactory("AsyncEscapeBridgeSender_", brokerController.getBrokerIdentity()),
+                        null,
+                        false);

Review Comment:
   Why do we need to create a ForkJoinPool? I think to create a common thread pool, and also do not need to create a NamedForkJoinWorkerThreadFactory util class



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org