diff --git a/kafka/src/main/java/com/duanledexianxianxian/demo/kafka/consumer/TestConsumer.java b/kafka/src/main/java/com/duanledexianxianxian/demo/kafka/consumer/TestConsumer.java index 8c92b45ed3dcbc05f823850b6209fc5c8177be01..0459282455f46d3ca800e6163d8ae9df464cc1e9 100644 --- a/kafka/src/main/java/com/duanledexianxianxian/demo/kafka/consumer/TestConsumer.java +++ b/kafka/src/main/java/com/duanledexianxianxian/demo/kafka/consumer/TestConsumer.java @@ -10,7 +10,7 @@ import org.springframework.stereotype.Component; * @author fengyuchenglun * @version 1.0.0 */ -//@Component +@Component public class TestConsumer { /** @@ -19,7 +19,7 @@ public class TestConsumer { * @param record the record * @throws Exception the exception */ - @KafkaListener(topics = "topic_first") + @KafkaListener(topics = "topic_second") public void listen(ConsumerRecord record) throws Exception { System.out.printf("topic = %s, offset = %d, value = %s \n", record.topic(), record.offset(), record.value()); }