59
59
import org .apache .rocketmq .broker .controller .ReplicasManager ;
60
60
import org .apache .rocketmq .broker .latency .BrokerFastFailure ;
61
61
import org .apache .rocketmq .broker .latency .BrokerFixedThreadPoolExecutor ;
62
- import org .apache .rocketmq .broker .loadbalance .AssignmentManager ;
63
62
import org .apache .rocketmq .broker .longpolling .LmqPullRequestHoldService ;
64
63
import org .apache .rocketmq .broker .longpolling .NotifyMessageArrivingListener ;
65
64
import org .apache .rocketmq .broker .longpolling .PullRequestHoldService ;
95
94
import org .apache .rocketmq .broker .topic .TopicConfigManager ;
96
95
import org .apache .rocketmq .broker .topic .TopicQueueMappingCleanService ;
97
96
import org .apache .rocketmq .broker .topic .TopicQueueMappingManager ;
97
+ import org .apache .rocketmq .broker .topic .TopicRouteInfoManager ;
98
98
import org .apache .rocketmq .broker .transaction .AbstractTransactionalMessageCheckListener ;
99
99
import org .apache .rocketmq .broker .transaction .TransactionalMessageCheckService ;
100
100
import org .apache .rocketmq .broker .transaction .TransactionalMessageService ;
@@ -171,7 +171,6 @@ public class BrokerController {
171
171
protected final ConsumerOrderInfoManager consumerOrderInfoManager ;
172
172
protected final ProducerManager producerManager ;
173
173
protected final ScheduleMessageService scheduleMessageService ;
174
- protected final AssignmentManager assignmentManager ;
175
174
protected final ClientHousekeepingService clientHousekeepingService ;
176
175
protected final PullMessageProcessor pullMessageProcessor ;
177
176
protected final PeekMessageProcessor peekMessageProcessor ;
@@ -191,6 +190,7 @@ public class BrokerController {
191
190
protected final ConsumerIdsChangeListener consumerIdsChangeListener ;
192
191
protected final EndTransactionProcessor endTransactionProcessor ;
193
192
private final RebalanceLockManager rebalanceLockManager = new RebalanceLockManager ();
193
+ private final TopicRouteInfoManager topicRouteInfoManager ;
194
194
protected BrokerOuterAPI brokerOuterAPI ;
195
195
protected ScheduledExecutorService scheduledExecutorService ;
196
196
protected ScheduledExecutorService syncBrokerMemberGroupExecutorService ;
@@ -322,7 +322,6 @@ public BrokerController(
322
322
323
323
this .filterServerManager = new FilterServerManager (this );
324
324
325
- this .assignmentManager = new AssignmentManager (this );
326
325
this .queryAssignmentProcessor = new QueryAssignmentProcessor (this );
327
326
this .clientManageProcessor = new ClientManageProcessor (this );
328
327
this .slaveSynchronize = new SlaveSynchronize (this );
@@ -386,6 +385,8 @@ public boolean online(String instanceId, String group, String topic) {
386
385
387
386
this .escapeBridge = new EscapeBridge (this );
388
387
388
+ this .topicRouteInfoManager = new TopicRouteInfoManager (this );
389
+
389
390
if (this .brokerConfig .isEnableSlaveActingMaster () && !this .brokerConfig .isSkipPreOnline ()) {
390
391
this .brokerPreOnlineService = new BrokerPreOnlineService (this );
391
392
}
@@ -1238,10 +1239,6 @@ protected void shutdownBasicService() {
1238
1239
this .ackMessageProcessor .shutdownPopReviveService ();
1239
1240
}
1240
1241
1241
- if (this .assignmentManager != null ) {
1242
- this .assignmentManager .shutdown ();
1243
- }
1244
-
1245
1242
if (this .notificationProcessor != null ) {
1246
1243
this .notificationProcessor .shutdown ();
1247
1244
}
@@ -1353,6 +1350,10 @@ protected void shutdownBasicService() {
1353
1350
escapeBridge .shutdown ();
1354
1351
}
1355
1352
1353
+ if (this .topicRouteInfoManager != null ) {
1354
+ this .topicRouteInfoManager .shutdown ();
1355
+ }
1356
+
1356
1357
if (this .brokerPreOnlineService != null && !this .brokerPreOnlineService .isStopped ()) {
1357
1358
this .brokerPreOnlineService .shutdown ();
1358
1359
}
@@ -1448,10 +1449,6 @@ protected void startBasicService() throws Exception {
1448
1449
this .ackMessageProcessor .startPopReviveService ();
1449
1450
}
1450
1451
1451
- if (this .assignmentManager != null ) {
1452
- this .assignmentManager .start ();
1453
- }
1454
-
1455
1452
if (this .topicQueueMappingCleanService != null ) {
1456
1453
this .topicQueueMappingCleanService .start ();
1457
1454
}
@@ -1484,6 +1481,10 @@ protected void startBasicService() throws Exception {
1484
1481
this .escapeBridge .start ();
1485
1482
}
1486
1483
1484
+ if (this .topicRouteInfoManager != null ) {
1485
+ this .topicRouteInfoManager .start ();
1486
+ }
1487
+
1487
1488
if (this .brokerPreOnlineService != null ) {
1488
1489
this .brokerPreOnlineService .start ();
1489
1490
}
@@ -1779,16 +1780,6 @@ private boolean needRegister(final String clusterName,
1779
1780
return needRegister ;
1780
1781
}
1781
1782
1782
- public String getNameServerList () {
1783
- if (this .brokerConfig .getNamesrvAddr () != null ) {
1784
- this .brokerOuterAPI .updateNameServerAddressList (this .brokerConfig .getNamesrvAddr ());
1785
- return this .brokerConfig .getNamesrvAddr ();
1786
- } else if (this .brokerConfig .isFetchNamesrvAddrByAddressServer ()) {
1787
- return this .brokerOuterAPI .fetchNameServerAddr ();
1788
- }
1789
- return null ;
1790
- }
1791
-
1792
1783
public void startService (long minBrokerId , String minBrokerAddr ) {
1793
1784
BrokerController .LOG .info ("{} start service, min broker id is {}, min broker addr: {}" ,
1794
1785
this .brokerConfig .getCanonicalName (), minBrokerId , minBrokerAddr );
@@ -2153,14 +2144,6 @@ public ExecutorService getSendMessageExecutor() {
2153
2144
return sendMessageExecutor ;
2154
2145
}
2155
2146
2156
- public AssignmentManager getAssignmentManager () {
2157
- return assignmentManager ;
2158
- }
2159
-
2160
- public ClientManageProcessor getClientManageProcessor () {
2161
- return clientManageProcessor ;
2162
- }
2163
-
2164
2147
public SendMessageProcessor getSendMessageProcessor () {
2165
2148
return sendMessageProcessor ;
2166
2149
}
@@ -2253,4 +2236,8 @@ public TimerCheckpoint getTimerCheckpoint() {
2253
2236
return timerCheckpoint ;
2254
2237
}
2255
2238
2239
+ public TopicRouteInfoManager getTopicRouteInfoManager () {
2240
+ return this .topicRouteInfoManager ;
2241
+ }
2242
+
2256
2243
}
0 commit comments