Skip to content

Support KRaft mode for EmbeddedKafkaBroker #2391

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

Closed
vladimirfx opened this issue Sep 10, 2022 · 8 comments · Fixed by #2820
Closed

Support KRaft mode for EmbeddedKafkaBroker #2391

vladimirfx opened this issue Sep 10, 2022 · 8 comments · Fixed by #2820

Comments

@vladimirfx
Copy link

Expected Behavior

The embedded Kafka broker should be able to run in KRaft mode.

Current Behavior

There is no option to run Kafka in KRaft mode nor to completely disable Zookeeper.

Context

KRaft mode becomes production ready from Kafka 3.3.0 and only available mode from Kafka 4+. So support for KRaft is becoming a requirement in 2023. But it is relevant just now for EmbeddedKafkaBroker because it is relative simplicity to run and minimize footprint by removing ZK.

@artembilan
Copy link
Member

Feel free to contribute this feature.
Or let's wait until it really becomes and official feature (3.3.0 GA), so we would be good to drop any ZK support we have in the embedded broker so far.

@garyrussell
Copy link
Contributor

We are now on Kafka 3.3.1 so this can be implemented; contributions are welcome.

@govi20
Copy link

govi20 commented Nov 2, 2022

If no one is working on it, I would like to give it a shot.

@artembilan
Copy link
Member

@govi20 ,

no one as far as I am aware.

Thank you for help proposal!

@eddumelendez
Copy link
Contributor

Hi 👋🏽, sorry for hijacking the thread but I think this can be useful information. Testcontainers Kafka module version 1.18.0 offers support for Kraft mode. Look at this test

https://github.com/testcontainers/testcontainers-java/blob/main/modules/kafka/src/test/java/org/testcontainers/containers/KafkaContainerTest.java#L136-L145

@garyrussell
Copy link
Contributor

I also found this apache/kafka#13375 which could be used as a basis for the changes needed here.

@garyrussell
Copy link
Contributor

I made some progress, but this is blocked by https://issues.apache.org/jira/projects/KAFKA/issues/KAFKA-15092

@garyrussell
Copy link
Contributor

Unblocked; the necessary class is in server-common...-test.jar.

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

Successfully merging a pull request may close this issue.

5 participants