Zookeeper kafka 安装常见错误
安 装 过 程 中 , 报 错 Exception thrown when sending a message with key= and
payload='1' to topic test
本地环境 springboot 集成 kafka 发消息报错 Exception thrown when sending a
message with key='' and payload='1' to topic test
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for test-
0 due to 30049 ms has passed since batch creation plus linger time
解决办法:
修改 kafka 配置文件 server.properties
listeners=PLAINTEXT://{内网 ip}:9092
advertised.listeners=PLAINTEXT://{外网 ip}:9092
重新启动本地项目,发送消息成功,并且 DEBUG 日志级别下会打印心跳日志