Comments (6)
Thanks for the report but I'm afraid I don't think I understand the problem. How can a DefaultKafkaProducerFactoryCustomizer
change the properties that have been bound to KafkaProperties
? Are you suggesting that the changes made to the producer's configs by any customizer should be mapped back to KafkaProperties
and then the validation should be performed?
from spring-boot.
The properties used by kafka producer factory is a combination of the properties generated by the buildProperties method and some customizations. The final set of properties should be validated. The properties set produced by buildProperties may not be valid but after the customizations are applied it may and vice versa.
I will provide a minimal example if you prefer.
from spring-boot.
The properties set produced by buildProperties may not be valid but after the customizations are applied it may and vice versa.
The intention of the customization is that it allows you to configure things that cannot be configured using the properties. If you're partially configuring something using properties and then completing and correcting it using a customizer, we'd recommend configuring it all using properties or all using a customizer.
I will provide a minimal example if you prefer.
Yes please, it may demonstrate a situation where a split approach is required. If it does, we may want to consider some additional properties to avoid the need.
from spring-boot.
Regardless of the intention of the customizer, the best moment to validate the state of a constructed bean is when all configuration has been applied. I consider other approaches a workaround and we already have a workaround on our side.
I just wanted to report this conceptual problem.
from spring-boot.
Regardless of the intention of the customizer, the best moment to validate the state of a constructed bean is when all configuration has been applied
That's what we're doing. The validation is being applied to KafkaProperties
at a time when all properties have been bound to it.
I just wanted to report this conceptual problem.
Thanks. I don't think such a problem exists as there's some separation between the properties and their validation and the customization of a producer factory so I'll close this one.
from spring-boot.
KafkaProperties is not a (real) bean, just a properties container/helper. Validation should be at the right moment in the kafkaProducerFactory bean its lifecycle (e.g. afterPropertiesSet)
from spring-boot.
Related Issues (20)
- spring-boot-docker-compose does not support `POSTGRES_HOST_AUTH_METHOD`
- Bump gradle/actions from 3.4.2 to 3.5.0
- Bump gradle/actions from 3.4.2 to 3.5.0
- Bump jfrog/setup-jfrog-cli from 4.1.2 to 4.1.3
- Bump jfrog/setup-jfrog-cli from 4.1.2 to 4.1.3
- Document that logging.file.name and logging.file.path cannot be used together
- Document that logging.file.name and logging.file.path cannot be used together
- Document the types to which each spring.mvc.format and spring.webflux.format property applies
- Document the types to which each spring.mvc.format and spring.webflux.format property applies
- Provide auto-configuration for authenticating with Couchbase using a client certificate HOT 1
- No configuration property for defaultTimeout setting that was introduced in Spring Integration 6.2
- No configuration property for defaultTimeout setting that was introduced in Spring Integration 6.2
- Upgrade to Spring GraphQL 1.2.8
- Upgrade to Spring GraphQL 1.2.8
- ServiceConnection does not work with @DataLdapTest
- @ConditionalOnBean matches beans that are not autowire candidates resulting in UnsatisfiedDependencyException when an attempt is made to inject the bean HOT 2
- Upgrade to Spring GraphQL 1.3.2
- Upgrade to Commons Codec 1.17.1
- Upgrade to Spring GraphQL 1.3.2
- Feature request: AutoConfiguration-Factories HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.