|  |  |  | 
|---|
|  |  |  | /* | 
|---|
|  |  |  | package com.moral.api.kafka.consumer; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSON; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //秒数据,修改设备状态,缓存最新秒数据 | 
|---|
|  |  |  | @KafkaListener(topics = KafkaConstants.TOPIC_SECOND, containerFactory = "stateListenerContainerFactory") | 
|---|
|  |  |  | /*@KafkaListener(topics = KafkaConstants.TOPIC_SECOND, containerFactory = "stateListenerContainerFactory") | 
|---|
|  |  |  | public void listenSecond(ConsumerRecord<String, String> record, Acknowledgment ack) { | 
|---|
|  |  |  | String msg = record.value(); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | 
|---|
|  |  |  | log.error("param{}" + msg); | 
|---|
|  |  |  | ack.acknowledge(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }*/ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //无人机秒数据 | 
|---|
|  |  |  | @KafkaListener(topics = KafkaConstants.UAV_TOPIC_SECOND, groupId = KafkaConstants.GROUP_INSERT, containerFactory = "insertListenerContainerFactory") | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | */ | 
|---|