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是否配置
kafka使用自带zookeeper单机测试生产消息报错when sending message to topic test with key: null, value: 4 bytes with_第1张图片
2.zookeeper.connect是否添加
kafka使用自带zookeeper单机测试生产消息报错when sending message to topic test with key: null, value: 4 bytes with_第2张图片
解决完毕 测试成功
kafka使用自带zookeeper单机测试生产消息报错when sending message to topic test with key: null, value: 4 bytes with_第3张图片
kafka使用自带zookeeper单机测试生产消息报错when sending message to topic test with key: null, value: 4 bytes with_第4张图片

你可能感兴趣的:(kafka使用自带zookeeper单机测试生产消息报错when sending message to topic test with key: null, value: 4 bytes with)