private Producer<String, byte[]> getKafkaProducer(String brokerList, String requiredAcks, HostMetadata host) {
Properties properties = new Properties();
properties.put("metadata.broker.list", brokerList);
properties.put("serializer.class", "kafka.serializer.DefaultEncoder");
properties.put("key.serializer.class", "kafka.serializer.StringEncoder");
properties.put("compression.type", "gzip");
properties.put("request.required.acks", requiredAcks);
properties.put("bootstrap.servers", brokerList);
properties.put("client.id", host.getTier() + "-" + host.getHost());
return new KafkaProducer<>(properties, new StringSerializer(), new ByteArraySerializer());
}