From aa7f659b235bcfb58652c3cc5523e52340edb5cc Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Sun, 7 Jul 2024 18:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=88=86=E7=89=87=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E6=B6=88=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../study/springcloud/kafka/consumer/services/MQListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka-01/kafka-01-consumer/src/main/java/cn/skcks/study/springcloud/kafka/consumer/services/MQListener.java b/kafka-01/kafka-01-consumer/src/main/java/cn/skcks/study/springcloud/kafka/consumer/services/MQListener.java index 16e14d2..10bf17d 100644 --- a/kafka-01/kafka-01-consumer/src/main/java/cn/skcks/study/springcloud/kafka/consumer/services/MQListener.java +++ b/kafka-01/kafka-01-consumer/src/main/java/cn/skcks/study/springcloud/kafka/consumer/services/MQListener.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Component; @Component public class MQListener { - @KafkaListener(topics = {"test"},groupId = "test-group") + @KafkaListener(topics = {"test"},groupId = "test-group", concurrency = "3") public void onMessage(ConsumerRecord record, Acknowledgment ack) { log.info("消费消息: 主题 {} 分片 {} ",record.topic(),record.partition()); log.info("key {}, value {}",record.key(),record.value());