question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"group.id" of ConsumerPropertie be replaced by "kafka-supervisor-%s" in kafka-indexing-service

See original GitHub issue

Affected Version

druid-0.16.0-incubating

Description

In the class org.apache.druid.indexing.kafka.KafkaRecordSupplier

the function getKafkaConsumer use default consumerConfigs to overwrite the user’s consumerProperties

private KafkaConsumer<byte[], byte[]> getKafkaConsumer() { final Map<String, Object> consumerConfigs = KafkaConsumerConfigs.getConsumerProperties(); final Properties props = new Properties(); addConsumerPropertiesFromConfig(props, sortingMapper, consumerProperties); props.putAll(consumerConfigs);

consumerConfigs is public class KafkaConsumerConfigs { public static Map<String, Object> getConsumerProperties() { final Map<String, Object> props = new HashMap<>(); props.put("metadata.max.age.ms", "10000"); props.put("group.id", StringUtils.format("kafka-supervisor-%s", RandomIdUtils.getRandomId())); props.put("auto.offset.reset", "none"); props.put("enable.auto.commit", "false"); props.put("isolation.level", "read_committed"); return props; } }

so the group.id of user’s ConsumerProperties will be repalced by the consumerConfigs from KafkaConsumerConfigs.getConsumerProperties()

I think exchange the place of the 2 line will solve the problem

addConsumerPropertiesFromConfig(props, sortingMapper, consumerProperties); props.putAll(consumerConfigs);

the code addConsumerPropertiesFromConfig(props, sortingMapper, consumerProperties); should be placed after the code props.putAll(consumerConfigs);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
FrankChen021commented, Apr 22, 2021

I have not dived into Kafka to see which requests from consumer are limited by kafka brokers. As far as I know, poll operation of KafkaComsumer does not send group.id to kafka brokers which means that operation could not be restricted.

Since kafka-acl allows ACLs to be configured on a specific consumer group, I think it makes sense to make group.id configurable.

0reactions
asdf2014commented, Apr 22, 2021

@phuchuynh9994 Make sense to me. Otherwise, the Kafka business data with Consumer authentication enabled cannot be written to the Druid cluster. Maybe we should make the group.id option is configurable, but by default, we still generate it randomly.

cc @gianm

Read more comments on GitHub >

github_iconTop Results From Across the Web

"group.id" of ConsumerPropertie be replaced by "kafka ...
so the group.id of user's ConsumerProperties will be repalced by the consumerConfigs from KafkaConsumerConfigs.getConsumerProperties().
Read more >
Apache Kafka ingestion
If your Kafka cluster enables consumer-group based ACLs, you can set group.id in consumerProperties to override the default auto generated group id.
Read more >
Kafka indexing service support in druid 0.13.0-incubating
Hello, I have been trying the Kafka indexing service to consume events ... KafkaSupervisor - Creating new task group [0] for partitions [0]....
Read more >
KafkaIndexTask Triggers Infinate Loop on Late Messages
To unsubscribe from this group and stop receiving emails from it, send an email to ... The new Kafka indexing service never drops...
Read more >
druid/extensions-core/kafka-indexing-service/src/main/java/io ...
public clreplaced KafkaSupervisor implements Supervisor ... Map<{group ID}, {actively reading task group}>; see doreplacedentation for TaskGroup clreplaced.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found