stream-out不会输出wordCount的结果

来源:8-5 Kafka Stream使用演示

imheyan

2022-11-20

我的操作步骤如下:

  1. debug idea 的 main 程序
  2. bin/kafka-console-producer.sh --broker-list 172.22.252.21:9092 --topic stream-in打开stream-in的topic
  3. 向stream-in中输入数据word
  4. 在开一个ssh,输入
bin/kafka-console-consumer.sh --bootstrap-server 172.22.251.21:9092 \
  --topic stream-out \
  --property print.key=true \
  --property print.value=true \
  --property key.deserializer=org.apache.kafka.common.serialization.StringDeserializer \
  --property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer \
  --from-beginning

最后,这个stream-out统计结果的topic的窗口没反应,不会输出统计结果,不论你在stream-in窗口输入多少数据。


idea的console一直有日志输出怎么回事,怎样才能看到统计结果呢?
图片描述

写回答

1回答

Allen

2022-12-11

哪里配置有问题吧, 也没报错,不太好判断问题

0
0

Kafka多维度系统精讲,从入门到实战开发

系统讲解Kafka,实战结合,让你成为使用Kafka的高手

896 学习 · 237 问题

查看课程