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.

KafkaConsumer hangs if 'group.id' property is missing

See original GitHub issue

Environment Information

  • OS : debian 9.6 (x86_64)
  • Node Version : 9.11.1
  • NPM Version : 6.5.0
  • node-rdkafka version : 2.5.1

Steps to Reproduce Instantiate a KafkaConsumer client without specifying a group.id property.

node-rdkafka Configuration Settings

const rd = require('node-rdkafka');

const options = {
  'metadata.broker.list': 'localhost:9092'
}

const consumer = new rd.KafkaConsumer(options);

consumer.on('ready', () => {
  consumer.subscribe([ 'some-topic' ]);
  consumer.consume((err, message) => {
    console.log(err, message);
  });
});

consumer.connect();
// .... nothing will happens : ready event will never been triggered, nor logging events
// Note: Kafka cluster is healthy

Additional context Kafka client just hangs - no event triggered, no debug message

I would expect KafkaConsumer to throw an error if group.id is missing or to generate a random one.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
subkcommented, Jan 31, 2019

Sure, Thats why I think node-rdkafka should throw an error when ‘group.id’ is missing.

0reactions
stale[bot]commented, May 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kafka consumer group hangs - Stack Overflow
In all cases I have tried, the consumer (ConsumerGroupExample) hangs waiting for a message despite evidence that there are many messages in ...
Read more >
Kafka Consumer | Confluent Documentation
An Apache Kafka consumer group is a set of consumers which cooperate to consume data from some topics.
Read more >
Chapter 4. Kafka Consumers: Reading Data from Kafka
The property is group.id and it specifies the consumer group the Kafka Consumer instance belongs to. While it is possible to create consumers...
Read more >
Documentation - Apache Kafka
The broker.id property is the unique and permanent name of each node in the cluster. We have to override the port and log...
Read more >
Kafka Consumer Groups & Offsets - Conduktor
Usually, we have as many consumers in a consumer group as the number of partitions. If we want more consumers for higher throughput,...
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