public class KafkaConsumerListenser {
@KafkaListener(group="KafkaConsumerListener" ,topics = "test")
void listener(ConsumerRecord consumerRecords, Acknowledgment ack){
System.out.println("-----------------------------------------------------------------"+consumerRecords.value());
ack.acknowledge();
}
}
刚才试了下去掉Integer也不行,换成这种方式就可以。继承接口的话就不行