gnodet opened a new pull request, #1709: URL: https://github.com/apache/camel-spring-boot/pull/1709
## Summary When using `camel-kafka-starter` with Spring Boot, users previously had to duplicate their Kafka configuration under both `spring.kafka.*` and `camel.component.kafka.*` properties. This PR adds automatic bridging so that Spring Boot's standard Kafka properties are picked up by the Camel Kafka component. ### Properties bridged | Spring Boot (`spring.kafka.*`) | Camel (`camel.component.kafka.*`) | |---|---| | `bootstrap-servers` | `brokers` | | `client-id` | `client-id` | | `security.protocol` | `security-protocol` | | `consumer.group-id` | `group-id` | | `ssl.key-store-location` | `ssl-keystore-location` | | `ssl.key-store-password` | `ssl-keystore-password` | | `ssl.key-store-type` | `ssl-keystore-type` | | `ssl.key-password` | `ssl-key-password` | | `ssl.trust-store-location` | `ssl-truststore-location` | | `ssl.trust-store-password` | `ssl-truststore-password` | | `ssl.trust-store-type` | `ssl-truststore-type` | | `ssl.protocol` | `ssl-protocol` | | `properties[sasl.mechanism]` | `sasl-mechanism` | | `properties[sasl.jaas.config]` | `sasl-jaas-config` | | `properties[sasl.kerberos.service.name]` | `sasl-kerberos-service-name` | ### Design - Uses Spring Boot's `Binder` to detect which `camel.component.kafka.*` properties the user explicitly set - Only bridges a Spring Boot value when the user has NOT explicitly set the corresponding Camel property - Explicit `camel.component.kafka.*` settings always take precedence - `@AutoConfigureBefore(KafkaComponentAutoConfiguration.class)` ensures bridging happens before the generated auto-configuration copies properties to the component - `@ConditionalOnClass(KafkaProperties.class)` ensures it only activates when `spring-boot-kafka` is on the classpath (optional dependency) ## Test plan - [x] 9 unit tests covering all bridged properties, precedence, and edge cases - [x] All tests pass - [ ] CI build passes - [ ] Integration test with a real Kafka broker (manual) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
