Reputation: 4362
I have a Confluent Platform Kafka Cluster with 3 nodes and everything seems to work fine but when product some message with the console, get the error!
command :
/opt/kafka/confluent-4.0.0/bin/kafka-console-producer --broker-list 109.169.xxx.xxx:9092 --topic sh
error :
ERROR Error when sending message to topic sh with key: null, value: 1 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for sh-1: 1538 ms has passed since batch creation plus linger time
Upvotes: 3
Views: 1727
Reputation: 191884
You can get this error with high latency connections (see you have 1.5s passing). The CLI works fine and would be "better" than writing the same simple thing in Java because the CLI is just a Java wrapper anyway. Python or kafkacat would be less verbose, sure
The default batch size of the console producer is 200 records, last time I looked, so if you are sending data less than this, then the batch will eventually expire
Upvotes: 1