| | |
| | | topic = topic.replace("${productId}", reqData.getProductId()).replace("${deviceId}", reqData.getDeviceId()); |
| | | |
| | | //如果是测试模式不执行推送 |
| | | if(configData.getActive().indexOf("dev")>=0){ |
| | | if (configData.getActive().indexOf("dev") >= 0) { |
| | | |
| | | log.info("----------------------------推送MQTT粮情信息,注:调试模式不推送---------------------------"); |
| | | log.info("-----TOPIC-----{}", topic); |
| | |
| | | |
| | | @Override |
| | | public BaseResp reportGrainDataByKafka(BaseReqData reqData) { |
| | | String topic = ScConstant.TOPIC_MESSAGE_REPORT; |
| | | String topic = ScConstant.TOPIC_ZLJ_GRAIN_TEMPERATURE; |
| | | |
| | | //如果是测试模式不执行推送 |
| | | if (configData.getActive().indexOf("dev") >= 0) { |
| | | |
| | | log.info("----------------------------推送KAFKA粮情信息,注:调试模式不推送---------------------------"); |
| | | log.info("-----TOPIC-----{}", topic); |
| | | log.info("-----Message-----{}", reqData.getData()); |
| | | |
| | | return new BaseResp(); |
| | | } |
| | | |
| | | kafkaDeviceReportService.publishWithTopic(reqData.getData(), topic); |
| | | return new BaseResp(); |
| | | } |