
您可以通过在使用者中使用属性 autoStartup (true / false)来做到这一点,如下所示-
@KafkaListener(id = "foo", topics = "Topic1", groupId = "group_id", containerFactory = "kafkaListenerContainerFactory",autoStartup = "${listen.auto.start:false}")public void consume(String message) { //System.out.println("Consumed message: " + message);}欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)