|
@@ -61,9 +61,13 @@ public class DtaListener {
|
|
|
|
|
|
List<TdaConfig> list = tdaConfigService.list();
|
|
|
|
|
|
- for (TdaConfig tdaConfig : list) {
|
|
|
- MessageConsumer consumer = getMessageConsumer(tdaConfig);
|
|
|
- listenerMap.put(tdaConfig.getId(), consumer);
|
|
|
+ try {
|
|
|
+ for (TdaConfig tdaConfig : list) {
|
|
|
+ MessageConsumer consumer = getMessageConsumer(tdaConfig);
|
|
|
+ listenerMap.put(tdaConfig.getId(), consumer);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("iot连接异常");
|
|
|
}
|
|
|
|
|
|
DynamicDataSourceContextHolder.clear();
|