kafka使用自带zookeeper单机测试生产消息报错when sending message to topic test with key: null, value: 4 bytes with
kafka使用自带zookeeper 单机测试生产消息报错
[2020-01-04 22:19:05,580] ERROR Error when sending message to topic test with key: null, value: 4 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for test-0: 1532 ms has passed since batch creation plus linger time
解决办法:
1.listeners是否配置
2.zookeeper.connect是否添加
解决完毕 测试成功