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

GH-2978: Propagate number of partitions to KRaft broker #2983

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

artembilan
Copy link
Member

Fixes: #2978

If we don't create topics manually, that can be done automatically on the broker side according to its configuration.

For that goal the EmbeddedKafkaKraftBroker is missing to populate KafkaConfig.NumPartitionsProp(): "" + this.partitionsPerTopic broker property from @EmbeddedKafka configuration

  • Propagate partitionsPerTopic option down to the embedded broker(s) in the EmbeddedKafkaKraftBroker
  • Some other simple refactoring in the EmbeddedKafkaKraftBroker
  • Verify the option propagated via new unit test in the KafkaTestUtilsTests.topicAutomaticallyCreatedWithProperNumberOfPartitions()

Fixes: spring-projects#2978

If we don't create topics manually, that can be done automatically on the broker side
according to its configuration.

For that goal the `EmbeddedKafkaKraftBroker` is missing to populate
`KafkaConfig.NumPartitionsProp(): "" + this.partitionsPerTopic` broker property from
`@EmbeddedKafka` configuration

* Propagate `partitionsPerTopic` option down to the embedded broker(s) in the `EmbeddedKafkaKraftBroker`
* Some other simple refactoring in the `EmbeddedKafkaKraftBroker`
* Verify the option propagated via new unit test in the `KafkaTestUtilsTests.topicAutomaticallyCreatedWithProperNumberOfPartitions()`
@sobychacko sobychacko merged commit 8cffe22 into spring-projects:main Jan 17, 2024
3 checks passed
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.

Spring Kafka Wait For Assignment Failed After Update To SpringBoot 3.2.0
2 participants