| | |
| | | IStorageMinioEventService storageMinioEventService = SpringUtils.getBean(IStorageMinioEventService.class); |
| | | storageMinioEventService.parseStorageMinioEvent(new String(message.getPayload(), StandardCharsets.UTF_8)); |
| | | } |
| | | if (topic.equals("radarWellData")) |
| | | { |
| | | System.out.println(new String(message.getPayload(), StandardCharsets.UTF_8)); |
| | | IStorageMinioEventService storageMinioEventService = SpringUtils.getBean(IStorageMinioEventService.class); |
| | | storageMinioEventService.parseStorageMinioEvent(new String(message.getPayload(), StandardCharsets.UTF_8)); |
| | | } |
| | | } catch (Exception e) { |
| | | log.debug("处理mqtt消息异常:" + e); |
| | | } |
| | |
| | | if (null != topic && null != qos) { |
| | | if (client.isConnected()) { |
| | | client.subscribe(topic, qos); |
| | | log.info("mqtt连接成功,客户端ID:" + PropertiesUtil.MQTT_CLIENT_ID); |
| | | log.info("mqtt连接成功" ); |
| | | log.info("--订阅主题::" + Arrays.toString(topic)); |
| | | } else { |
| | | log.info("mqtt连接失败,客户端ID:" + PropertiesUtil.MQTT_CLIENT_ID); |
| | | log.info("mqtt连接失败"); |
| | | } |
| | | } |
| | | } catch (Exception e) { |