Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: KafkaIO does not make use of Kafka Consumer Groups #25978

Closed
2 of 15 tasks
srfrnk opened this issue Mar 25, 2023 · 7 comments
Closed
2 of 15 tasks

[Bug]: KafkaIO does not make use of Kafka Consumer Groups #25978

srfrnk opened this issue Mar 25, 2023 · 7 comments

Comments

@srfrnk
Copy link
Contributor

srfrnk commented Mar 25, 2023

What happened?

I'm using KafkaIO to consume events from a Kafka topic.
I've added "group.id" to the consumer properties.
When running the pipeline I can see this value sent to Kafka in the consumer properties.
The consumers created by KafkaIO fail to join the consumer group.
Looking into the code I can see that no where is the consumer "subscribing" to the topic which is how KafkaConsumer should join a consumer group. It seems the code attempts to circumvent the partition assignment mechanism provided by Kafka to use it's own.
By doing that it prevents the user from using consumer groups.
Is that by intention? Is there any reason why the decision to avoid using consumer groups has been taken?
I would love to see any documentation about that if possible please.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@aromanenko-dev
Copy link
Contributor

Thanks for reporting but it looks more as a question for [email protected] or [email protected]
Would you mind to start a discussion on this topic there?

@srfrnk
Copy link
Contributor Author

srfrnk commented Apr 14, 2023

Thanks @aromanenko-dev.
I wasn't aware of these.
Happy to do so.
Can you send me a link to any documentation about how to create such a discussion please?

@aromanenko-dev
Copy link
Contributor

@srfrnk Sure!
https://beam.apache.org/community/contact-us/

@johnjcasey
Copy link
Contributor

Closing as this has moved to the user lists

@github-actions github-actions bot added this to the 2.48.0 Release milestone May 11, 2023
@kschat
Copy link

kschat commented Jun 15, 2023

For those who stumbled upon this thread (like me), you can find the continued conversation here.

@gabrywu
Copy link
Member

gabrywu commented Oct 17, 2023

It is a pity that beam doesn't use consumer group, without which, it will be inconvenient for us

@srfrnk
Copy link
Contributor Author

srfrnk commented Oct 18, 2023

@gabrywu if you'd like you can clone my original attempt to rewrite that part to use consumer groups.
It's partially limited and needs some cleaning up but as a POC it was working.
You can find it here: https://github.com/srfrnk/demo/blob/cg-reader/beam-kafka2file/src/main/java/kafka/Read.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants