allow Kafka consumer group.id to be overriden by config (#3765)

This commit is contained in:
David Lim 2016-12-08 16:53:13 -07:00 committed by Charles Allen
parent 6386e6a4dc
commit 7f087cdd3b
1 changed files with 4 additions and 2 deletions

View File

@ -594,11 +594,13 @@ public class KafkaSupervisor implements Supervisor
private KafkaConsumer<byte[], byte[]> getKafkaConsumer() private KafkaConsumer<byte[], byte[]> getKafkaConsumer()
{ {
final Properties props = new Properties(); final Properties props = new Properties();
props.setProperty("metadata.max.age.ms", "10000");
props.setProperty("group.id", String.format("kafka-supervisor-%s", getRandomId()));
props.putAll(ioConfig.getConsumerProperties()); props.putAll(ioConfig.getConsumerProperties());
props.setProperty("enable.auto.commit", "false"); props.setProperty("enable.auto.commit", "false");
props.setProperty("metadata.max.age.ms", "10000");
props.setProperty("group.id", String.format("kafka-supervisor-%s", getRandomId()));
ClassLoader currCtxCl = Thread.currentThread().getContextClassLoader(); ClassLoader currCtxCl = Thread.currentThread().getContextClassLoader();
try { try {