Hello, We currently use Kafka 1.0.2 and find that sometimes when using KafkaProducer.send(), it blocked and didn't throw any exception.
Some code snippets and configuration are as fellows. Any feedback is welcomed, thank you. Tung-Yu ##### code snippets ######## Producer<String, String> producer = new KafkaProducer<>(props); try (BufferedReader br = new BufferedReader(new FileReader(new File(targetFilePath)))) { String line = br.readLine(); while (line != null) { ProducerRecord<String, String> data = new ProducerRecord<String, String>(topicName, line); producer.send(data); // sometimes it blocked here line = br.readLine(); } } catch (Exception e) { logger.error(e.getMessage(), e); } producer.close(); ##### code snippet ######## #### some producer configuration ###### request.timeout.ms=60000 batch.size=20000 buffer.memory=33554432 retries=3 #### some producer configuration ######