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

Add Pulsar container factory customizers #42182

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Sep 8, 2024

This commit adds the ability for users to customize the auto-configured Spring for Apache Pulsar message container factories. Each container factory holds a set of container properties that is a common target for users to configure. Allowing the customization of these properties prevents a rapid increase of configuration properties for secondary priority properties.

Note

I originally submitted a PR to add config props for the startup failure options and timeout. However, in most cases, that alone is not sufficient and users will want to create their own retry template custom to their environment/scenario. This lead for the need to either allow users to configure in retry templates for each container (which would require @Qualifer and got messy quick. By allowing customization of the container factory we allow ourselves to get out of the "I need to add another config property" business for properties that are not primary in nature. Configuring the startup failure policy is probably not a primary operation. If we agree w/ this then the other PR can be closed in favor of this proposal.

This commit adds the ability for users to customize the auto-configured
Spring for Apache Pulsar message container factories. Each container
factory holds a set of container properties that is a common target for
users to configure. Allowing the customization of these properties
prevents a rapid increase of configuration properties.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 8, 2024
@mhalbritter mhalbritter added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 9, 2024
@mhalbritter mhalbritter added this to the 3.4.x milestone Sep 9, 2024
@snicoll
Copy link
Member

snicoll commented Sep 9, 2024

Thanks for the PR. Rather than 3 customizer interfaces, can you please look if we could replace that with a generic? See org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers for an example of how that can be used.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Sep 9, 2024
@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Sep 9, 2024
@snicoll snicoll added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Sep 9, 2024
@onobc
Copy link
Contributor Author

onobc commented Sep 10, 2024

@snicoll thanks for pointing out the CacheManagerCustomizers. I have done the same in the latest commit. The cache manager would have an explosion of interfaces had you not introduced the customizers concept then. Thanks for that - it also cleaned up these 3 into 1.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Sep 10, 2024
snicoll pushed a commit that referenced this pull request Sep 10, 2024
This commit adds the ability for users to customize the auto-configured
Spring for Apache Pulsar message container factories. Each container
factory holds a set of container properties that is a common target for
users to configure. Allowing the customization of these properties
prevents a rapid increase of configuration properties.

See gh-42182
@snicoll snicoll closed this in 24040e2 Sep 10, 2024
@snicoll snicoll modified the milestones: 3.4.x, 3.4.0-M3 Sep 10, 2024
@snicoll snicoll self-assigned this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants