??????????????????????broker??????????????scanNotActiveBroker????????????????scanNotActiveBroker????????????????????????????????????????
??????????????..... if ((last + BROKER_CHANNEL_EXPIRED_TIME) < System.currentTimeMillis()) ?????????? ------------------ ???????? ------------------ ??????: "??????"<[email protected]>; ????????: 2018??3??16??(??????) ????11:17 ??????: "users"<[email protected]>; ????: Re:??????rocketmq???????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????broker??????????????scanNotActiveBroker????????????????scanNotActiveBroker??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????broker?????????????????????????????????????? ??2018-03-15??"????" <[email protected]> ????: -----????????----- ??????: "????" <[email protected]> ????????: 2018??3??15?? ?????? ??????: users <[email protected]>, users <[email protected]> ????: ??????rocketmq???????????? ?????? ?????????????????????????? scanNotActiveBroker ???? unregisterBroker?? registerBroker?????????????????????? scanNotActiveBroker ??10??????????????unregisterBroker ?? registerBroker ???????????????????????????????? ???????????????????????? scanNotActiveBroker ?????????????????????? scanNotActiveBroker ?????????????????????? ??10?????????????????????????????????????????????????????????????????????????????????????? ???????????????? ------------------ ???????? ------------------ ??????: "??????"<[email protected]>; ????????: 2018??3??14??(??????) ????3:23 ??????: "users"<[email protected]>; ????: rocketmq???????????? this.brokerLiveTable = new HashMap<String, BrokerLiveInfo>(256); */ public void scanNotActiveBroker() { Iterator<Entry<String, BrokerLiveInfo>> it = this.brokerLiveTable.entrySet().iterator(); while (it.hasNext()) { Entry<String, BrokerLiveInfo> next = it.next(); long last = next.getValue().getLastUpdateTimestamp(); if ((last + BROKER_CHANNEL_EXPIRED_TIME) < System.currentTimeMillis()) { RemotingUtil.closeChannel(next.getValue().getChannel()); it.remove(); log.warn("The broker channel expired, {} {}ms", next.getKey(), BROKER_CHANNEL_EXPIRED_TIME); this.onChannelDestroy(/**brokerAddress*/next.getKey(), /**??????channel*/next.getValue().getChannel()); } } }????????rocketmq??????????broker??????????????????????????????????????????????????????????????????????Iterator????????map??????????broker????????????????java.util.ConcurrentModificationException??
