| | |
| | | |
| | | @Override //消息发布者消息发布完成产生的回调 |
| | | public void deliveryComplete(IMqttDeliveryToken token) { |
| | | log.info("deliveryComplete---------" + token.isComplete()); |
| | | log.debug("deliveryComplete---------" + token.isComplete()); |
| | | int messageId = token.getMessageId(); |
| | | String[] topics = token.getTopics(); |
| | | String clientId = token.getClient().getClientId(); |
| | |
| | | topicStr = topicStr + topic + ","; |
| | | } |
| | | topicStr = topicStr.substring(0, topicStr.length() - 1); |
| | | log.info("消息发布完成,messageId="+messageId+",topics="+topicStr+",clientId="+clientId); |
| | | log.debug("消息发布完成,messageId="+messageId+",topics="+topicStr+",clientId="+clientId); |
| | | } |
| | | |
| | | @Override//消息订阅者收到消息后触发的回调 |