private void setupConsumer() {
    this.conf.set("kafka.bootstrap.servers", KafkaBrokerResource.BROKER_IP_PORT);
    Properties consumerProps = new Properties();
    consumerProps.setProperty("enable.auto.commit", "false");
    consumerProps.setProperty("auto.offset.reset", "none");
    consumerProps.setProperty("bootstrap.servers", KafkaBrokerResource.BROKER_IP_PORT);
    consumerProps.setProperty("key.deserializer", ByteArrayDeserializer.class.getName());
    consumerProps.setProperty("value.deserializer", ByteArrayDeserializer.class.getName());
    consumerProps.setProperty("request.timeout.ms", "3002");
    consumerProps.setProperty("fetch.max.wait.ms", "3001");
    consumerProps.setProperty("session.timeout.ms", "3001");
    consumerProps.setProperty("metadata.max.age.ms", "100");
    this.consumer = new KafkaConsumer<>(consumerProps);
  }
Test class for Kafka simple writer.
kafka-handler/src/test/org/apache/hadoop/hive/kafka/SimpleKafkaWriterTest.java