Skip to content

Kafka 4.0 support #1379

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

maxwolf8852
Copy link

@maxwolf8852 maxwolf8852 commented Apr 30, 2025

Updated deprecated protocol fields for Apache Kafka 4.0 support:

  • JoinGroup: V1 -> V2
  • CreateTopics: V0 -> V2
  • DeleteTopics V0 -> V1

While Conn does not use Client, the "negotiateVersion" mechanism has been reused for backward compatibility.

@maxwolf8852 maxwolf8852 force-pushed the kafka-4.0-support branch 4 times, most recently from af9aa5c to 6bf481f Compare April 30, 2025 14:30
@maxwolf8852 maxwolf8852 marked this pull request as ready for review April 30, 2025 15:42
Copy link
Contributor

@petedannemann petedannemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! The main feedback is it looks like ThrottleTime was actually added to CreateTopics responses in v2, not v1. I think if possible it would be good to ensure our tests cover both supported versions with this change. Additionally, we should add Kafka 4.0 to our circleci testing matrix to make sure the tests do actually succeed there

@maxwolf8852 maxwolf8852 force-pushed the kafka-4.0-support branch from 0fd6f96 to 5a30e00 Compare May 1, 2025 00:22
@petedannemann
Copy link
Contributor

Looks like there are some additional issues with tests. I think these may have started with kafka 3.X and I started trying to dig into them here #1381

@petedannemann
Copy link
Contributor

Thank you for addressing my feedback though, this PR looks good I just need to figure out the test issues before we can merge this

@maxwolf8852 maxwolf8852 force-pushed the kafka-4.0-support branch from c3e2460 to dc6328a Compare May 7, 2025 13:01
@maxwolf8852 maxwolf8852 force-pushed the kafka-4.0-support branch from dc6328a to 51771dd Compare May 7, 2025 13:16
@petedannemann
Copy link
Contributor

petedannemann commented May 7, 2025

What I am seeing in my PR is a lot of these errors in Kafka's logs that cause many requests to fail during tests

Timeout failed due to Java heap space

I've tried adding JVM_OPTS for increasing the heap size and I am still seeing the errors even with a huge amount of memory given to Kafka. I wonder if Kafka 4.0 is not stable yet, it seems like the heap size cannot be adjusted as expected and the memory usage is not predictable

@maxwolf8852
Copy link
Author

What I am seeing in my PR is a lot of these errors in Kafka's logs that cause many requests to fail during tests

Timeout failed due to Java heap space

I've tried adding JVM_OPTS for increasing the heap size and I am still seeing the errors even with a huge amount of memory given to Kafka. I wonder if Kafka 4.0 is not stable yet, it seems like the heap size cannot be adjusted as expected and the memory usage is not predictable

Yes, as you can see, such errors only occur when using consumer group.
I also tried to reproduce these errors on a local device with more memory and they are still here. I'm currently trying to delve deeper into the problem.

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

Successfully merging this pull request may close these issues.

2 participants