return consumer;
}
}
static ConsumerConfig toConsumerConfig(final KafkaConsumerConfiguration configuration) {
final ZooKeeperConfiguration zookeeper = configuration.getZookeeper();
final Properties props = new Properties();
props.setProperty("zk.connect",
zookeeper.getQuorumSpec());
props.setProperty("zk.connectiontimeout.ms",
String.valueOf(zookeeper.getConnectionTimeout().toMilliseconds()));
props.setProperty("zk.sessiontimeout.ms",
String.valueOf(zookeeper.getSessionTimeout().toMilliseconds()));
props.setProperty("groupid",
configuration.getGroup());
props.setProperty("socket.timeout.ms",
String.valueOf(configuration.getSocketTimeout().toMilliseconds()));
props.setProperty("socket.buffersize",