Skip to content

suggestion: change @RetryableTopic replicationFactor default to -1 (broker default) #2471

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
benissimo opened this issue Nov 9, 2022 · 3 comments · Fixed by #2473
Closed
Assignees
Milestone

Comments

@benissimo
Copy link

Currently the default value is "1".
That's fine when developing against docker, but in most real world situations the brokers will have min.insync.replicas set to some higher value, obliging the developer to override.
If instead the default value were "-1", that means use whatever the broker's default replication factor is.
This saves the developer from having to think about replication factor unless they need something different.

@garyrussell
Copy link
Contributor

Out of curiosity, how did you create an issue with no labels? The New Issue button asks you to select between a bug and a new feature.

We can change this default in 3.0; we can't really do it in earlier releases because this is not valid if the broker is < 2.4.

We made a similar change in spring-cloud-stream.

spring-attic/spring-cloud-stream-binder-kafka#1202 (comment)

@garyrussell garyrussell self-assigned this Nov 9, 2022
@garyrussell garyrussell added this to the 3.0.0 milestone Nov 9, 2022
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Nov 9, 2022
@benissimo
Copy link
Author

benissimo commented Nov 9, 2022

Thanks for adding the label. I submitted the ticket via https://github.com/spring-projects/spring-kafka/issues/new and didn't see a prompt to choose how to categorize it.

I hadn't realized replicas = -1 would only work with Kafka as of 2.4. Good point! It would be useful in spring-kafka 3.0.0 though. Thanks for adding it to the milestone.

artembilan pushed a commit that referenced this issue Nov 9, 2022
Resolves #2471

Set the default to -1 (use broker default).
@garyrussell
Copy link
Contributor

Ah - thanks; yes the "New Issue" button opens https://github.com/spring-projects/spring-kafka/issues/new/choose

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.

2 participants