|
|
|
|
@ -192,12 +192,12 @@ public class ScheduledService {
|
|
|
|
|
nowWeather.setCreateDate(now);
|
|
|
|
|
|
|
|
|
|
//用 Disruptor 消息队列 实现特快高并发处理,支撑每秒 600 万订单无压力!
|
|
|
|
|
DisruptorMqService disruptorMqService = SpringUtil.getBean(DisruptorMqService.class);
|
|
|
|
|
disruptorMqService.pushMessageToMq(nowWeather);
|
|
|
|
|
// DisruptorMqService disruptorMqService = SpringUtil.getBean(DisruptorMqService.class);
|
|
|
|
|
// disruptorMqService.pushMessageToMq(nowWeather);
|
|
|
|
|
|
|
|
|
|
//直接jpa存储数据到表
|
|
|
|
|
// NmcWeatherService nmcWeatherServiceTemp = SpringUtil.getBean(NmcWeatherService.class);
|
|
|
|
|
// nmcWeatherServiceTemp.saveNowWeather(nowWeather);
|
|
|
|
|
NmcWeatherService nmcWeatherServiceTemp = SpringUtil.getBean(NmcWeatherService.class);
|
|
|
|
|
nmcWeatherServiceTemp.saveNowWeather(nowWeather);
|
|
|
|
|
log.info("消息队列已发送完毕");
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|