| | |
| | | throw new Exception("Mqtt连接池获得订阅连接不可用"); |
| | | } |
| | | subClients.add(clientSub) ; |
| | | |
| | | // 订阅主题 |
| | | if(this.configVo.subTopics != null && this.configVo.subTopics.length > 0){ |
| | | if(this.configVo.protocolAndDeviceIds != null || this.configVo.protocolAndDeviceIds.length > 0){ |
| | | for(int i = 0; i < this.configVo.subTopics.length; i++){ |
| | | for(int j = 0 ; j < this.configVo.protocolAndDeviceIds.length; j++){ |
| | | clientSub.subscribe(ServerProperties.orgTag + "/" |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void stop()throws Exception{ |
| | | if(subClients != null && subClients.size() > 0){ |