title: org.apache.kafka.common.errors.TimeoutException: Expiring 119 record(s) for TopicJAVA-0: 60030 ms has passed since batch creation plus linger time
body: <p>Here is my code and dependency.I am trying to write Messages to KAfka using a Producer API. And The topic is being also created though the messages are not being send to Kafka topic with the following exception </p>
  
  <p>org.apache.kafka.common.errors.TimeoutException: Expiring 119 record(s) for TopicJAVA-0: 60049 ms has passed since batch creation plus linger time.</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
  
       Map&lt;String,Object&gt; map=new HashMap&lt;String, Object&gt;();
          map.put("bootstrap.servers","10.1.7.82:6667");
          map.put("key.serializer","org.apache.kafka.common.serialization.StringSerializer");
          map.put("value.serializer","org.apache.kafka.common.serialization.StringSerializer");
          map.put("metadata.fetch.timeout.ms", "60000");
          map.put("request.timeout.ms", "60000");
          map.put("batch.size",16384);
          map.put("buffer.memory", 33554432);
  
      KafkaProducer&lt;String, String&gt; producer = new KafkaProducer&lt;String, String&gt;(map);
      // Write
          // create the topic message, enter topic name and message
          ProducerRecord&lt;String, String&gt; record = new ProducerRecord&lt;String, String&gt;("TopicJAVA", "msg from java");
          // function to push the message to kafka topic
          RecordMetadata meta=producer.send(record).get();
          System.out.println("Message Sent"+meta.partition());
          Thread.sleep(500);
          producer.close();
  
  }
  </code></pre>
  
  <p>And here is my dependency POM</p>
  
  <p>http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;com.gaurav.kafka&lt;/groupId&gt;
  &lt;artifactId&gt;kakfa-producer-consumer-example&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;kakfa-producer-consumer-example&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients --&gt;
      &lt;!-- &lt;dependency&gt;
          &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
          &lt;artifactId&gt;kafka-clients&lt;/artifactId&gt;
          &lt;version&gt;1.1.0&lt;/version&gt;
      &lt;/dependency&gt; --&gt;
  
      &lt;!-- Ashok Kafka Dependencies --&gt;
  
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
          &lt;artifactId&gt;kafka_2.10&lt;/artifactId&gt;
          &lt;version&gt;0.8.2.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;kafka-clients&lt;/artifactId&gt;
      &lt;version&gt;0.10.2.1&lt;/version&gt;
  &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.101tec&lt;/groupId&gt;
          &lt;artifactId&gt;zkclient&lt;/artifactId&gt;
          &lt;version&gt;0.7&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  
      &lt;!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;2.9.5&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have absolutely no idea on what are missing here.An insight into this would be really helpful.Our kafka version is 10.1.2.6.4.0-91
  M trying to resolve it for the last 3 days but feeling helpless</p>