| | |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Autowired |
| | | private HistorySecondSpecialService historySecondSpecialService; |
| | | |
| | | @Autowired |
| | | private HistorySecondCruiserService historySecondCruiserService; |
| | | |
| | | @Autowired |
| | |
| | | } |
| | | |
| | | //走航车秒数据 |
| | | @KafkaListener(topics = KafkaConstants.CRUISER_TOPIC_SECOND, groupId = KafkaConstants.GROUP_INSERT, containerFactory = "insertListenerContainerFactory") |
| | | @KafkaListener(topics = KafkaConstants.CRUISER_TOPIC_SECOND, containerFactory = "insertListenerContainerFactory") |
| | | public void listenSecondCruiser(ConsumerRecord<String, String> record, Acknowledgment ack) { |
| | | String msg = record.value(); |
| | | try { |
| | |
| | | historySecondCruiserService.insertHistorySecond(data); |
| | | ack.acknowledge(); |
| | | } catch (Exception e) { |
| | | log.error("param{}" + msg); |
| | | log.error("param{}" + e); |
| | | } |
| | | } |
| | | } |