private void emitBatch() {
Properties props = new Properties();
props.put("metadata.broker.list", "localhost:9092");
props.put("serializer.class", "kafka.serializer.StringEncoder");
props.put("request.required.acks", "1");
ProducerConfig config = new ProducerConfig(props);
Producer<String, String> producer = new Producer<String, String>(config);
for (String sentence : sentences) {
KeyedMessage<String, String> data =
new KeyedMessage<String, String>(topicName, sentence);