DakshinJeeva opened a new pull request, #30548: URL: https://github.com/apache/camel/pull/30548
## Problem The `createDatabaseIfNotExists` and `createContainerIfNotExists` endpoint options were ignored by the Azure Cosmos DB producer when the corresponding exchange headers were not explicitly set. The issue was caused by reading the headers using `boolean.class`. When a header was missing, it was converted to `false` instead of `null`. Consequently, the fallback to the endpoint configuration was never applied. ## Solution - Changed the header conversion type from `boolean.class` to `Boolean.class` in `CosmosDbConfigurationOptionsProxy`. - This allows missing headers to resolve to `null`, enabling the existing fallback mechanism to use the configured endpoint options. - Explicit exchange headers continue to take precedence over endpoint configuration. ## Test Cases Added a regression test in `CosmosDbProducerIT` to verify that: - The database is automatically created when `createDatabaseIfNotExists=true` is configured on the endpoint. - The container is automatically created when `createContainerIfNotExists=true` is configured on the endpoint. - An item can be successfully inserted without explicitly setting the corresponding creation headers. -- 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]
