This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 24314a8c039a CAMEL-27618: camel-azure-cosmosdb - PartitionKey header,
header metadata, deprecate clientTelemetryEnabled (#31004)
24314a8c039a is described below
commit 24314a8c039a921d59df5886bb3be214a54faec9
Author: allthingssecurity <[email protected]>
AuthorDate: Fri Nov 27 22:17:58 2026 +0530
CAMEL-27618: camel-azure-cosmosdb - PartitionKey header, header metadata,
deprecate clientTelemetryEnabled (#31004)
1. The item partition key was always read as a String. A
com.azure.cosmos.models.PartitionKey in the
CamelAzureCosmosDbItemPartitionKey header was converted to its JSON text
(PartitionKey.toString), so the operation used a different key. Such a
header is now used as it is, which allows a partition key value that is
a number or a boolean. Other header values are still converted to a
String, and a missing partition key is still the null partition key
value: an Integer header that addresses a String key, or an item whose
partition key is JSON null, keeps working.
2. clientTelemetryEnabled has no effect: in azure-cosmos 4.75.0
CosmosClientBuilder.clientTelemetryEnabled(boolean) only returns the
builder. The option is deprecated.
3. The constants of CosmosDbConstants have @Metadata (description,
javaType, label producer), and CosmosDbEndpoint has headersClass, so the
headers are in the catalog, the Endpoint DSL and the generated header
table of the doc page. The hand-written header tables are removed. The
header metadata also covers CamelAzureCosmosDbIndexingPolicy, which the
hand-written tables missed, and gives Timestamp its real type, Instant.
4. RESOURCE_ID was CamelAzureCosmosDbRecourseId. It is now
CamelAzureCosmosDbResourceId, without an alias, as design/headers.adoc
describes for header renames.
5. databaseEndpoint is no longer marked required: the component only
requires it when cosmosAsyncClient is not set, and checks that itself.
6. The default of consistencyLevel is now Session, the spelling of its
enum values in the metadata (both spellings convert).
7. indexingPolicy has the label producer,advanced instead of
"common, advanced": only the producer uses it. Without the space the
group is producer (advanced) instead of " advanced".
8. The doc page asked for an Azure Storage account; it needs an Azure
Cosmos DB account.
Upgrade guide entry for 4.24 for points 1, 2, 3, 4 and 7. Regenerated: the
component JSON and its catalog copy, the doc page and its catalog copy,
and the endpoint and component DSL.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../camel/catalog/components/azure-cosmosdb.json | 43 +-
.../catalog/docs/azure-cosmosdb-component.adoc | 39 +-
.../component/azure/cosmosdb/azure-cosmosdb.json | 43 +-
.../src/main/docs/azure-cosmosdb-component.adoc | 39 +-
.../azure/cosmosdb/CosmosDbConfiguration.java | 17 +-
.../CosmosDbConfigurationOptionsProxy.java | 7 +
.../azure/cosmosdb/CosmosDbConstants.java | 85 +++-
.../component/azure/cosmosdb/CosmosDbEndpoint.java | 3 +-
.../cosmosdb/CosmosDbItemPartitionKeyTest.java | 64 +++
.../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 16 +
.../dsl/AzureCosmosdbComponentBuilderFactory.java | 11 +-
.../builder/endpoint/EndpointHeaderBuilders.java | 14 +
.../dsl/CosmosDbEndpointBuilderFactory.java | 559 +++++++++++++++------
13 files changed, 689 insertions(+), 251 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
index 6f9db3de7bc5..de0399820925 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
@@ -24,16 +24,16 @@
"remote": true
},
"componentProperties": {
- "clientTelemetryEnabled": { "index": 0, "kind": "property", "displayName":
"Client Telemetry Enabled", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to enable client
telemetry. This has no effect: the a [...]
+ "clientTelemetryEnabled": { "index": 0, "kind": "property", "displayName":
"Client Telemetry Enabled", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": true,
"deprecationNote": "Has no effect: the azure-cosmos SDK ignores this flag, as
it can no longer send client telemetry to the service.", "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.Cosmos [...]
"configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "common", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"deprecated": false, "autowired": false, "secret": false, "description": "The
configuration of the component. Each endpoint that the component creates starts
from a copy of it, to which the options of the endpoint are applied." },
"connectionSharingAcrossClientsEnabled": { "index": 2, "kind": "property",
"displayName": "Connection Sharing Across Clients Enabled", "group": "common",
"label": "common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client
shares its [...]
- "consistencyLevel": { "index": 3, "kind": "property", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"SESSION", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFie [...]
+ "consistencyLevel": { "index": 3, "kind": "property", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"Session", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFie [...]
"containerPartitionKeyPath": { "index": 4, "kind": "property",
"displayName": "Container Partition Key Path", "group": "common", "label":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The partition key path
of a container that the component creates, for [...]
"contentResponseOnWriteEnabled": { "index": 5, "kind": "property",
"displayName": "Content Response On Write Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether Cosmos DB
returns the item in the resp [...]
"cosmosAsyncClient": { "index": 6, "kind": "property", "displayName":
"Cosmos Async Client", "group": "common", "label": "common", "required": false,
"type": "object", "javaType": "com.azure.cosmos.CosmosAsyncClient",
"deprecated": false, "autowired": true, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "To use a custom
com.azure.cosmos.CosmosAsyncClient for all requests. [...]
"createContainerIfNotExists": { "index": 7, "kind": "property",
"displayName": "Create Container If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
container when it does not ex [...]
"createDatabaseIfNotExists": { "index": 8, "kind": "property",
"displayName": "Create Database If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
database when it does not exist [...]
- "databaseEndpoint": { "index": 9, "kind": "property", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": true,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure.co [...]
+ "databaseEndpoint": { "index": 9, "kind": "property", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure.c [...]
"multipleWriteRegionsEnabled": { "index": 10, "kind": "property",
"displayName": "Multiple Write Regions Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client sends
writes to any writable re [...]
"preferredRegions": { "index": 11, "kind": "property", "displayName":
"Preferred Regions", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "A comma-separated list
of the preferred regions of a geo-replicated account, in order of [...]
"readRequestsFallbackEnabled": { "index": 12, "kind": "property",
"displayName": "Read Requests Fallback Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client can
send reads to the other reg [...]
@@ -51,11 +51,36 @@
"operation": { "index": 24, "kind": "property", "displayName":
"Operation", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition",
"enum": [ "listDatabases", "createDatabase", "queryDatabases",
"deleteDatabase", "createContainer", "replaceDatabaseThroughput",
"listContainers", "queryContainers", "deleteContainer",
"replaceContainerThroughput", "createItem", "upsertItem", "delet [...]
"query": { "index": 25, "kind": "property", "displayName": "Query",
"group": "producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The SQL query of
queryDatabases, queryContainers and queryItems, for example SELECT * FROM c
WHERE c.id = ' [...]
"queryRequestOptions": { "index": 26, "kind": "property", "displayName":
"Query Request Options", "group": "producer", "label": "producer", "required":
false, "type": "object", "javaType":
"com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.CosmosQueryReque [...]
- "indexingPolicy": { "index": 27, "kind": "property", "displayName":
"Indexing Policy", "group": " advanced", "label": "common, advanced",
"required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of a container [...]
+ "indexingPolicy": { "index": 27, "kind": "property", "displayName":
"Indexing Policy", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of [...]
"autowiredEnabled": { "index": 28, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
"accountKey": { "index": 29, "kind": "property", "displayName": "Account
Key", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The key of the Azure
Cosmos DB account, a read-write key or a read-only key [...]
"credentialType": { "index": 30, "kind": "property", "displayName":
"Credential Type", "group": "security", "label": "security", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.common.CredentialType", "enum": [
"SHARED_ACCOUNT_KEY", "AZURE_IDENTITY" ], "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "SHARED_ACCOUNT_KEY",
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFie [...]
},
+ "headers": {
+ "CamelAzureCosmosDbDatabaseName": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the database. Replaces the databaseName option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#DATABASE_NAME" },
+ "CamelAzureCosmosDbContainerName": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the container. Replaces the containerName option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CONTAINER_NAME" },
+ "CamelAzureCosmosDbOperation": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition",
"enum": [ "listDatabases", "createDatabase", "queryDatabases",
"deleteDatabase", "createContainer", "replaceDatabaseThroughput",
"listContainers", "queryContainers", "deleteContainer",
"replaceContainerThroughput", "createItem", "upsertItem", "deleteItem", "r [...]
+ "CamelAzureCosmosDbQuery": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The SQL query of queryDatabases, queryContainers and
queryItems. Replaces the query option.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#QUERY" },
+ "CamelAzureCosmosDbQueryRequestOptions": { "index": 4, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated":
false, "autowired": false, "secret": false, "description": "The options of
queryDatabases, listContainers, queryContainers, readAllItems and queryItems.
Replaces the queryRequestOptions option.", "constantName":
"org.apache.camel.component.azure.cosmosdb.C [...]
+ "CamelAzureCosmosDbCreateDatabaseIfNotExist": { "index": 5, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Boolean", "deprecated": false, "autowired":
false, "secret": false, "description": "Whether to create the database when it
does not exist. Replaces the createDatabaseIfNotExists option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CREATE_DATABASE_IF_NOT_EXIST"
},
+ "CamelAzureCosmosDbCreateContainerIfNotExist": { "index": 6, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Boolean", "deprecated": false, "autowired":
false, "secret": false, "description": "Whether to create the container when it
does not exist. Replaces the createContainerIfNotExists option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CREATE_CONTAINER_IF_NOT_EXIST"
},
+ "CamelAzureCosmosDbIndexingPolicy": { "index": 7, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.IndexingPolicy", "deprecated": false,
"autowired": false, "secret": false, "description": "The indexing policy of a
container that the producer creates. Replaces the indexingPolicy option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#INDEXING_POLICY" },
+ "CamelAzureCosmosDbThroughputProperties": { "index": 8, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.ThroughputProperties", "deprecated":
false, "autowired": false, "secret": false, "description": "The throughput of a
database or container that the producer creates, and the new throughput of
replaceDatabaseThroughput and replaceContainerThroughput. Replaces the
throughputProperties option.", "co [...]
+ "CamelAzureCosmosDbDatabaseRequestOptions": { "index": 9, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType":
"com.azure.cosmos.models.CosmosDatabaseRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "description": "The request options of
deleteDatabase.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#DATABASE_REQUEST_OPTIONS"
},
+ "CamelAzureCosmosDbContainerPartitionKeyPath": { "index": 10, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "String", "deprecated": false, "autowired":
false, "secret": false, "description": "The partition key path of a container
that the producer creates. Replaces the containerPartitionKeyPath option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CONTAINER_PARTITION_KEY_PATH"
},
+ "CamelAzureCosmosDbContainerRequestOptions": { "index": 11, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType":
"com.azure.cosmos.models.CosmosContainerRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "description": "The request options of
deleteContainer.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CONTAINER_REQUEST_OPTIONS"
},
+ "CamelAzureCosmosDbItemPartitionKey": { "index": 12, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String or com.azure.cosmos.models.PartitionKey", "deprecated":
false, "autowired": false, "secret": false, "description": "The value of the
partition key of the item for createItem, upsertItem, replaceItem, deleteItem
and readItem, and of the items that readAllItems reads. Replaces the
itemPartitionKey option. A com.azure. [...]
+ "CamelAzureCosmosDbItemRequestOptions": { "index": 13, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.CosmosItemRequestOptions", "deprecated":
false, "autowired": false, "secret": false, "description": "The request options
of createItem, upsertItem, replaceItem, deleteItem and readItem.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#ITEM_REQUEST_OPTIONS"
},
+ "CamelAzureCosmosDbItemId": { "index": 14, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The id of the item for readItem, replaceItem and deleteItem.
Replaces the itemId option.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#ITEM_ID" },
+ "CamelAzureCosmosDbResourceId": { "index": 15, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The resource id of the database or container, set by the
operations on a database or a container that get its properties back, such as
createDatabase and createContainer.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstan [...]
+ "CamelAzureCosmosDbEtag": { "index": 16, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The entity tag of the database, container, throughput or item
that the operation returns.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#E_TAG" },
+ "CamelAzureCosmosDbTimestamp": { "index": 17, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "java.time.Instant", "deprecated": false, "autowired": false,
"secret": false, "description": "The time of the last update of the database,
container or throughput that the operation returns.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#TIMESTAMP" },
+ "CamelAzureCosmosDbResponseHeaders": { "index": 18, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Map<String, String>", "deprecated": false, "autowired": false,
"secret": false, "description": "The headers of the response of Cosmos DB, for
all operations except listDatabases, queryDatabases, listContainers,
queryContainers, readAllItems and queryItems.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosD [...]
+ "CamelAzureCosmosDbStatusCode": { "index": 19, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "The HTTP status code of the response of Cosmos DB, for
all operations except listDatabases, queryDatabases, listContainers,
queryContainers, readAllItems and queryItems.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstan [...]
+ "CamelAzureCosmosDbDefaultTimeToLiveInSeconds": { "index": 20, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Integer", "deprecated": false, "autowired":
false, "secret": false, "description": "The default time to live of the items
of the container, in seconds, set by the operations on a container that get its
properties back, such as createContainer.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbC [...]
+ "CamelAzureCosmosDbManualThroughput": { "index": 21, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "The manual throughput, in request units per second,
after replaceDatabaseThroughput or replaceContainerThroughput.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#MANUAL_THROUGHPUT"
},
+ "CamelAzureCosmosDbAutoscaleMaxThroughput": { "index": 22, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Integer", "deprecated": false, "autowired":
false, "secret": false, "description": "The maximum autoscale throughput, in
request units per second, after replaceDatabaseThroughput or
replaceContainerThroughput.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#AUTOSCALE_MAX_THROUGHPUT"
}
+ },
"bodyTypes": {
"consumerOut": { "carriers": [ "list" ], "javaType":
"java.util.List<java.util.Map<String, Object>>", "description": "The items of
one batch of the change feed: a List with a Map per item created or changed,
with the system fields of Cosmos DB such as _etag and _lsn" },
"producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "createItem", "carriers": [ "map", "pojo", "text",
"bytes", "stream", "file" ] }, { "option": "operation", "value": "upsertItem",
"carriers": [ "map", "pojo", "text", "bytes", "stream", "file" ] }, { "option":
"operation", "value": "replaceItem", "carriers": [ "map", "pojo", "text",
"bytes", "stream", "file" ] } ], "description": "The item for createItem,
upsertItem and replaceItem: a Map or a POJO [...]
@@ -64,15 +89,15 @@
"properties": {
"databaseName": { "index": 0, "kind": "path", "displayName": "Database
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The name of the
database. The consumer requires it. The producer uses it for each operation
except listData [...]
"containerName": { "index": 1, "kind": "path", "displayName": "Container
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The name of the
container. The consumer requires it, and receives the changes of this
container. The prod [...]
- "clientTelemetryEnabled": { "index": 2, "kind": "parameter",
"displayName": "Client Telemetry Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to enable client
telemetry. This has no effect: the [...]
+ "clientTelemetryEnabled": { "index": 2, "kind": "parameter",
"displayName": "Client Telemetry Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": true, "deprecationNote": "Has no effect: the azure-cosmos SDK
ignores this flag, as it can no longer send client telemetry to the service.",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass": "org.apache.camel.component.azure.cosmosdb.Cosmo [...]
"connectionSharingAcrossClientsEnabled": { "index": 3, "kind":
"parameter", "displayName": "Connection Sharing Across Clients Enabled",
"group": "common", "label": "common", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client
shares it [...]
- "consistencyLevel": { "index": 4, "kind": "parameter", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"SESSION", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFi [...]
+ "consistencyLevel": { "index": 4, "kind": "parameter", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"Session", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFi [...]
"containerPartitionKeyPath": { "index": 5, "kind": "parameter",
"displayName": "Container Partition Key Path", "group": "common", "label":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The partition key path
of a container that the component creates, fo [...]
"contentResponseOnWriteEnabled": { "index": 6, "kind": "parameter",
"displayName": "Content Response On Write Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether Cosmos DB
returns the item in the res [...]
"cosmosAsyncClient": { "index": 7, "kind": "parameter", "displayName":
"Cosmos Async Client", "group": "common", "label": "common", "required": false,
"type": "object", "javaType": "com.azure.cosmos.CosmosAsyncClient",
"deprecated": false, "autowired": true, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "To use a custom
com.azure.cosmos.CosmosAsyncClient for all requests. [...]
"createContainerIfNotExists": { "index": 8, "kind": "parameter",
"displayName": "Create Container If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
container when it does not e [...]
"createDatabaseIfNotExists": { "index": 9, "kind": "parameter",
"displayName": "Create Database If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
database when it does not exis [...]
- "databaseEndpoint": { "index": 10, "kind": "parameter", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": true,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure. [...]
+ "databaseEndpoint": { "index": 10, "kind": "parameter", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure [...]
"multipleWriteRegionsEnabled": { "index": 11, "kind": "parameter",
"displayName": "Multiple Write Regions Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client sends
writes to any writable r [...]
"preferredRegions": { "index": 12, "kind": "parameter", "displayName":
"Preferred Regions", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "A comma-separated list
of the preferred regions of a geo-replicated account, in order o [...]
"readRequestsFallbackEnabled": { "index": 13, "kind": "parameter",
"displayName": "Read Requests Fallback Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client can
send reads to the other re [...]
@@ -91,8 +116,8 @@
"operation": { "index": 26, "kind": "parameter", "displayName":
"Operation", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition",
"enum": [ "listDatabases", "createDatabase", "queryDatabases",
"deleteDatabase", "createContainer", "replaceDatabaseThroughput",
"listContainers", "queryContainers", "deleteContainer",
"replaceContainerThroughput", "createItem", "upsertItem", "dele [...]
"query": { "index": 27, "kind": "parameter", "displayName": "Query",
"group": "producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The SQL query of
queryDatabases, queryContainers and queryItems, for example SELECT * FROM c
WHERE c.id = [...]
"queryRequestOptions": { "index": 28, "kind": "parameter", "displayName":
"Query Request Options", "group": "producer", "label": "producer", "required":
false, "type": "object", "javaType":
"com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.CosmosQueryRequ [...]
- "lazyStartProducer": { "index": 29, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "indexingPolicy": { "index": 30, "kind": "parameter", "displayName":
"Indexing Policy", "group": " advanced", "label": "common, advanced",
"required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of a containe [...]
+ "indexingPolicy": { "index": 29, "kind": "parameter", "displayName":
"Indexing Policy", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of [...]
+ "lazyStartProducer": { "index": 30, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"accountKey": { "index": 31, "kind": "parameter", "displayName": "Account
Key", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The key of the Azure
Cosmos DB account, a read-write key or a read-only ke [...]
"credentialType": { "index": 32, "kind": "parameter", "displayName":
"Credential Type", "group": "security", "label": "security", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.common.CredentialType", "enum": [
"SHARED_ACCOUNT_KEY", "AZURE_IDENTITY" ], "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "SHARED_ACCOUNT_KEY",
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFi [...]
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-cosmosdb-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-cosmosdb-component.adoc
index 04002dff2ab8..76ef599739c1 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-cosmosdb-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-cosmosdb-component.adoc
@@ -21,7 +21,7 @@ component interacts with Azure CosmosDB through Azure SQL API.
Prerequisites
-You must have a valid Windows Azure Storage account. More information is
available at
+You must have a valid Azure Cosmos DB account. More information is available at
https://docs.microsoft.com/azure/[Azure Documentation Portal].
@@ -86,43 +86,6 @@ and UP once it has started. It does not follow what the
change feed processor do
consumer check, camel-health asks it only for a route that starts with the
CamelContext, and
`camel.health.exclude-pattern=consumer:<routeId>` leaves it out.
-=== Message headers evaluated by the component producer
-[width="100%",cols="10%,10%,10%,70%",options="header",]
-|=======================================================================
-|Header |Variable Name |Type |Description
-
-|`CamelAzureCosmosDbDatabaseName`| `CosmosDbConstants.DATABASE_NAME`|`String`|
Overrides the database name which is the name of the Cosmos database that
component should connect to. In case you are producing data and have
createDatabaseIfNotExists=true, the component will automatically auto create a
Cosmos database.
-|`CamelAzureCosmosDbContainerName`|
`CosmosDbConstants.CONTAINER_NAME`|`String`| Overrides the container name which
is the name of the Cosmos container that component should connect to. In case
you are producing data and have createContainerIfNotExists=true, the component
will automatically auto create a Cosmos container.
-|`CamelAzureCosmosDbOperation`|
`CosmosDbConstants.OPERATION`|`CosmosDbOperationsDefinition`| Set the producer
operation which can be used to execute a specific operation on the producer.
-|`CamelAzureCosmosDbQuery`| `CosmosDbConstants.QUERY`|`String`| Set the SQL
query to execute on a given producer query operations.
-|`CamelAzureCosmosDbQueryRequestOptions`|
`CosmosDbConstants.QUERY_REQUEST_OPTIONS`|`CosmosQueryRequestOptions`| Set
additional QueryRequestOptions that can be used with queryItems,
queryContainers, queryDatabases, listDatabases, listItems, listContainers
operations.
-|`CamelAzureCosmosDbCreateDatabaseIfNotExist`|
`CosmosDbConstants.CREATE_DATABASE_IF_NOT_EXIST`|`boolean`| Sets if the
component should create the Cosmos database automatically in case it doesn't
exist in the Cosmos account.
-|`CamelAzureCosmosDbCreateContainerIfNotExist`|
`CosmosDbConstants.CREATE_CONTAINER_IF_NOT_EXIST`|`boolean`| Sets if the
component should create Cosmos container automatically in case it doesn't exist
in the Cosmos account.
-|`CamelAzureCosmosDbThroughputProperties`|
`CosmosDbConstants.THROUGHPUT_PROPERTIES`|`ThroughputProperties`| Sets
throughput of the resources in the Azure Cosmos DB service.
-|`CamelAzureCosmosDbDatabaseRequestOptions`|
`CosmosDbConstants.DATABASE_REQUEST_OPTIONS`|`CosmosDatabaseRequestOptions`|
Sets additional options to execute on database operations.
-|`CamelAzureCosmosDbContainerPartitionKeyPath`|
`CosmosDbConstants.CONTAINER_PARTITION_KEY_PATH`|`String`| Set the container
partition key path.
-|`CamelAzureCosmosDbContainerRequestOptions`|
`CosmosDbConstants.CONTAINER_REQUEST_OPTIONS`|`CosmosContainerRequestOptions`|
Set additional options to execute on container operations.
-|`CamelAzureCosmosDbItemPartitionKey`|
`CosmosDbConstants.ITEM_PARTITION_KEY`|`String`| Set the partition key.
Represents a partition key value in the Azure Cosmos DB database service. A
partition key identifies the partition where the item is stored in.
-|`CamelAzureCosmosDbItemRequestOptions`|
`CosmosDbConstants.ITEM_REQUEST_OPTIONS`|`CosmosItemRequestOptions`| Set
additional options to execute on item operations.
-|`CamelAzureCosmosDbItemId`| `CosmosDbConstants.ITEM_ID`|`String`| Set the
itemId in case needed for operation on item like _delete_, _replace_.
-|=======================================================================
-
-
-=== Message headers set by the component producer
-[width="100%",cols="10%,10%,10%,70%",options="header",]
-|=======================================================================
-|Header |Variable Name |Type |Description
-
-|`CamelAzureCosmosDbRecourseId`| `CosmosDbConstants.RESOURCE_ID`|`String`| The
resource ID of the requested resource.
-|`CamelAzureCosmosDbEtag`| `CosmosDbConstants.E_TAG`|`String`| The Etag ID of
the requested resource.
-|`CamelAzureCosmosDbTimestamp`| `CosmosDbConstants.TIMESTAMP`|`String`| The
timestamp of the requested resource.
-|`CamelAzureCosmosDbResponseHeaders`|
`CosmosDbConstants.RESPONSE_HEADERS`|`Map`| The response headers of the
requested resource.
-|`CamelAzureCosmosDbStatusCode`| `CosmosDbConstants.STATUS_CODE`|`Integer`|
The status code of the requested resource.
-|`CamelAzureCosmosDbDefaultTimeToLiveInSeconds`|
`CosmosDbConstants.DEFAULT_TIME_TO_LIVE_SECONDS`|`Integer`| The TTL of the
requested resource.
-|`CamelAzureCosmosDbManualThroughput`|
`CosmosDbConstants.MANUAL_THROUGHPUT`|`Integer`| The manual throughput of the
requested resource.
-|`CamelAzureCosmosDbAutoscaleMaxThroughput`|
`CosmosDbConstants.AUTOSCALE_MAX_THROUGHPUT`|`Integer`| The
AutoscaleMaxThroughput of the requested resource.
-|=======================================================================
-
=== Azure CosmosDB Producer operations
Camel Azure CosmosDB component provides a wide range of operations on the
producer side:
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/generated/resources/META-INF/org/apache/camel/component/azure/cosmosdb/azure-cosmosdb.json
b/components/camel-azure/camel-azure-cosmosdb/src/generated/resources/META-INF/org/apache/camel/component/azure/cosmosdb/azure-cosmosdb.json
index 6f9db3de7bc5..de0399820925 100644
---
a/components/camel-azure/camel-azure-cosmosdb/src/generated/resources/META-INF/org/apache/camel/component/azure/cosmosdb/azure-cosmosdb.json
+++
b/components/camel-azure/camel-azure-cosmosdb/src/generated/resources/META-INF/org/apache/camel/component/azure/cosmosdb/azure-cosmosdb.json
@@ -24,16 +24,16 @@
"remote": true
},
"componentProperties": {
- "clientTelemetryEnabled": { "index": 0, "kind": "property", "displayName":
"Client Telemetry Enabled", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to enable client
telemetry. This has no effect: the a [...]
+ "clientTelemetryEnabled": { "index": 0, "kind": "property", "displayName":
"Client Telemetry Enabled", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": true,
"deprecationNote": "Has no effect: the azure-cosmos SDK ignores this flag, as
it can no longer send client telemetry to the service.", "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.Cosmos [...]
"configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "common", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"deprecated": false, "autowired": false, "secret": false, "description": "The
configuration of the component. Each endpoint that the component creates starts
from a copy of it, to which the options of the endpoint are applied." },
"connectionSharingAcrossClientsEnabled": { "index": 2, "kind": "property",
"displayName": "Connection Sharing Across Clients Enabled", "group": "common",
"label": "common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client
shares its [...]
- "consistencyLevel": { "index": 3, "kind": "property", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"SESSION", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFie [...]
+ "consistencyLevel": { "index": 3, "kind": "property", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"Session", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFie [...]
"containerPartitionKeyPath": { "index": 4, "kind": "property",
"displayName": "Container Partition Key Path", "group": "common", "label":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The partition key path
of a container that the component creates, for [...]
"contentResponseOnWriteEnabled": { "index": 5, "kind": "property",
"displayName": "Content Response On Write Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether Cosmos DB
returns the item in the resp [...]
"cosmosAsyncClient": { "index": 6, "kind": "property", "displayName":
"Cosmos Async Client", "group": "common", "label": "common", "required": false,
"type": "object", "javaType": "com.azure.cosmos.CosmosAsyncClient",
"deprecated": false, "autowired": true, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "To use a custom
com.azure.cosmos.CosmosAsyncClient for all requests. [...]
"createContainerIfNotExists": { "index": 7, "kind": "property",
"displayName": "Create Container If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
container when it does not ex [...]
"createDatabaseIfNotExists": { "index": 8, "kind": "property",
"displayName": "Create Database If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
database when it does not exist [...]
- "databaseEndpoint": { "index": 9, "kind": "property", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": true,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure.co [...]
+ "databaseEndpoint": { "index": 9, "kind": "property", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure.c [...]
"multipleWriteRegionsEnabled": { "index": 10, "kind": "property",
"displayName": "Multiple Write Regions Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client sends
writes to any writable re [...]
"preferredRegions": { "index": 11, "kind": "property", "displayName":
"Preferred Regions", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "A comma-separated list
of the preferred regions of a geo-replicated account, in order of [...]
"readRequestsFallbackEnabled": { "index": 12, "kind": "property",
"displayName": "Read Requests Fallback Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client can
send reads to the other reg [...]
@@ -51,11 +51,36 @@
"operation": { "index": 24, "kind": "property", "displayName":
"Operation", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition",
"enum": [ "listDatabases", "createDatabase", "queryDatabases",
"deleteDatabase", "createContainer", "replaceDatabaseThroughput",
"listContainers", "queryContainers", "deleteContainer",
"replaceContainerThroughput", "createItem", "upsertItem", "delet [...]
"query": { "index": 25, "kind": "property", "displayName": "Query",
"group": "producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The SQL query of
queryDatabases, queryContainers and queryItems, for example SELECT * FROM c
WHERE c.id = ' [...]
"queryRequestOptions": { "index": 26, "kind": "property", "displayName":
"Query Request Options", "group": "producer", "label": "producer", "required":
false, "type": "object", "javaType":
"com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.CosmosQueryReque [...]
- "indexingPolicy": { "index": 27, "kind": "property", "displayName":
"Indexing Policy", "group": " advanced", "label": "common, advanced",
"required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of a container [...]
+ "indexingPolicy": { "index": 27, "kind": "property", "displayName":
"Indexing Policy", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of [...]
"autowiredEnabled": { "index": 28, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
"accountKey": { "index": 29, "kind": "property", "displayName": "Account
Key", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The key of the Azure
Cosmos DB account, a read-write key or a read-only key [...]
"credentialType": { "index": 30, "kind": "property", "displayName":
"Credential Type", "group": "security", "label": "security", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.common.CredentialType", "enum": [
"SHARED_ACCOUNT_KEY", "AZURE_IDENTITY" ], "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "SHARED_ACCOUNT_KEY",
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFie [...]
},
+ "headers": {
+ "CamelAzureCosmosDbDatabaseName": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the database. Replaces the databaseName option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#DATABASE_NAME" },
+ "CamelAzureCosmosDbContainerName": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the container. Replaces the containerName option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CONTAINER_NAME" },
+ "CamelAzureCosmosDbOperation": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition",
"enum": [ "listDatabases", "createDatabase", "queryDatabases",
"deleteDatabase", "createContainer", "replaceDatabaseThroughput",
"listContainers", "queryContainers", "deleteContainer",
"replaceContainerThroughput", "createItem", "upsertItem", "deleteItem", "r [...]
+ "CamelAzureCosmosDbQuery": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The SQL query of queryDatabases, queryContainers and
queryItems. Replaces the query option.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#QUERY" },
+ "CamelAzureCosmosDbQueryRequestOptions": { "index": 4, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated":
false, "autowired": false, "secret": false, "description": "The options of
queryDatabases, listContainers, queryContainers, readAllItems and queryItems.
Replaces the queryRequestOptions option.", "constantName":
"org.apache.camel.component.azure.cosmosdb.C [...]
+ "CamelAzureCosmosDbCreateDatabaseIfNotExist": { "index": 5, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Boolean", "deprecated": false, "autowired":
false, "secret": false, "description": "Whether to create the database when it
does not exist. Replaces the createDatabaseIfNotExists option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CREATE_DATABASE_IF_NOT_EXIST"
},
+ "CamelAzureCosmosDbCreateContainerIfNotExist": { "index": 6, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Boolean", "deprecated": false, "autowired":
false, "secret": false, "description": "Whether to create the container when it
does not exist. Replaces the createContainerIfNotExists option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CREATE_CONTAINER_IF_NOT_EXIST"
},
+ "CamelAzureCosmosDbIndexingPolicy": { "index": 7, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.IndexingPolicy", "deprecated": false,
"autowired": false, "secret": false, "description": "The indexing policy of a
container that the producer creates. Replaces the indexingPolicy option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#INDEXING_POLICY" },
+ "CamelAzureCosmosDbThroughputProperties": { "index": 8, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.ThroughputProperties", "deprecated":
false, "autowired": false, "secret": false, "description": "The throughput of a
database or container that the producer creates, and the new throughput of
replaceDatabaseThroughput and replaceContainerThroughput. Replaces the
throughputProperties option.", "co [...]
+ "CamelAzureCosmosDbDatabaseRequestOptions": { "index": 9, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType":
"com.azure.cosmos.models.CosmosDatabaseRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "description": "The request options of
deleteDatabase.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#DATABASE_REQUEST_OPTIONS"
},
+ "CamelAzureCosmosDbContainerPartitionKeyPath": { "index": 10, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "String", "deprecated": false, "autowired":
false, "secret": false, "description": "The partition key path of a container
that the producer creates. Replaces the containerPartitionKeyPath option.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CONTAINER_PARTITION_KEY_PATH"
},
+ "CamelAzureCosmosDbContainerRequestOptions": { "index": 11, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType":
"com.azure.cosmos.models.CosmosContainerRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "description": "The request options of
deleteContainer.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#CONTAINER_REQUEST_OPTIONS"
},
+ "CamelAzureCosmosDbItemPartitionKey": { "index": 12, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String or com.azure.cosmos.models.PartitionKey", "deprecated":
false, "autowired": false, "secret": false, "description": "The value of the
partition key of the item for createItem, upsertItem, replaceItem, deleteItem
and readItem, and of the items that readAllItems reads. Replaces the
itemPartitionKey option. A com.azure. [...]
+ "CamelAzureCosmosDbItemRequestOptions": { "index": 13, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.cosmos.models.CosmosItemRequestOptions", "deprecated":
false, "autowired": false, "secret": false, "description": "The request options
of createItem, upsertItem, replaceItem, deleteItem and readItem.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#ITEM_REQUEST_OPTIONS"
},
+ "CamelAzureCosmosDbItemId": { "index": 14, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The id of the item for readItem, replaceItem and deleteItem.
Replaces the itemId option.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#ITEM_ID" },
+ "CamelAzureCosmosDbResourceId": { "index": 15, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The resource id of the database or container, set by the
operations on a database or a container that get its properties back, such as
createDatabase and createContainer.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstan [...]
+ "CamelAzureCosmosDbEtag": { "index": 16, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The entity tag of the database, container, throughput or item
that the operation returns.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#E_TAG" },
+ "CamelAzureCosmosDbTimestamp": { "index": 17, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "java.time.Instant", "deprecated": false, "autowired": false,
"secret": false, "description": "The time of the last update of the database,
container or throughput that the operation returns.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#TIMESTAMP" },
+ "CamelAzureCosmosDbResponseHeaders": { "index": 18, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Map<String, String>", "deprecated": false, "autowired": false,
"secret": false, "description": "The headers of the response of Cosmos DB, for
all operations except listDatabases, queryDatabases, listContainers,
queryContainers, readAllItems and queryItems.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosD [...]
+ "CamelAzureCosmosDbStatusCode": { "index": 19, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "The HTTP status code of the response of Cosmos DB, for
all operations except listDatabases, queryDatabases, listContainers,
queryContainers, readAllItems and queryItems.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstan [...]
+ "CamelAzureCosmosDbDefaultTimeToLiveInSeconds": { "index": 20, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Integer", "deprecated": false, "autowired":
false, "secret": false, "description": "The default time to live of the items
of the container, in seconds, set by the operations on a container that get its
properties back, such as createContainer.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbC [...]
+ "CamelAzureCosmosDbManualThroughput": { "index": 21, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "The manual throughput, in request units per second,
after replaceDatabaseThroughput or replaceContainerThroughput.",
"constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#MANUAL_THROUGHPUT"
},
+ "CamelAzureCosmosDbAutoscaleMaxThroughput": { "index": 22, "kind":
"header", "displayName": "", "group": "producer", "label": "producer",
"required": false, "javaType": "Integer", "deprecated": false, "autowired":
false, "secret": false, "description": "The maximum autoscale throughput, in
request units per second, after replaceDatabaseThroughput or
replaceContainerThroughput.", "constantName":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConstants#AUTOSCALE_MAX_THROUGHPUT"
}
+ },
"bodyTypes": {
"consumerOut": { "carriers": [ "list" ], "javaType":
"java.util.List<java.util.Map<String, Object>>", "description": "The items of
one batch of the change feed: a List with a Map per item created or changed,
with the system fields of Cosmos DB such as _etag and _lsn" },
"producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "createItem", "carriers": [ "map", "pojo", "text",
"bytes", "stream", "file" ] }, { "option": "operation", "value": "upsertItem",
"carriers": [ "map", "pojo", "text", "bytes", "stream", "file" ] }, { "option":
"operation", "value": "replaceItem", "carriers": [ "map", "pojo", "text",
"bytes", "stream", "file" ] } ], "description": "The item for createItem,
upsertItem and replaceItem: a Map or a POJO [...]
@@ -64,15 +89,15 @@
"properties": {
"databaseName": { "index": 0, "kind": "path", "displayName": "Database
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The name of the
database. The consumer requires it. The producer uses it for each operation
except listData [...]
"containerName": { "index": 1, "kind": "path", "displayName": "Container
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The name of the
container. The consumer requires it, and receives the changes of this
container. The prod [...]
- "clientTelemetryEnabled": { "index": 2, "kind": "parameter",
"displayName": "Client Telemetry Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to enable client
telemetry. This has no effect: the [...]
+ "clientTelemetryEnabled": { "index": 2, "kind": "parameter",
"displayName": "Client Telemetry Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": true, "deprecationNote": "Has no effect: the azure-cosmos SDK
ignores this flag, as it can no longer send client telemetry to the service.",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass": "org.apache.camel.component.azure.cosmosdb.Cosmo [...]
"connectionSharingAcrossClientsEnabled": { "index": 3, "kind":
"parameter", "displayName": "Connection Sharing Across Clients Enabled",
"group": "common", "label": "common", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client
shares it [...]
- "consistencyLevel": { "index": 4, "kind": "parameter", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"SESSION", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFi [...]
+ "consistencyLevel": { "index": 4, "kind": "parameter", "displayName":
"Consistency Level", "group": "common", "label": "common", "required": false,
"type": "enum", "javaType": "com.azure.cosmos.ConsistencyLevel", "enum": [
"Strong", "BoundedStaleness", "Session", "Eventual", "ConsistentPrefix" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"Session", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFi [...]
"containerPartitionKeyPath": { "index": 5, "kind": "parameter",
"displayName": "Container Partition Key Path", "group": "common", "label":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The partition key path
of a container that the component creates, fo [...]
"contentResponseOnWriteEnabled": { "index": 6, "kind": "parameter",
"displayName": "Content Response On Write Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether Cosmos DB
returns the item in the res [...]
"cosmosAsyncClient": { "index": 7, "kind": "parameter", "displayName":
"Cosmos Async Client", "group": "common", "label": "common", "required": false,
"type": "object", "javaType": "com.azure.cosmos.CosmosAsyncClient",
"deprecated": false, "autowired": true, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "To use a custom
com.azure.cosmos.CosmosAsyncClient for all requests. [...]
"createContainerIfNotExists": { "index": 8, "kind": "parameter",
"displayName": "Create Container If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
container when it does not e [...]
"createDatabaseIfNotExists": { "index": 9, "kind": "parameter",
"displayName": "Create Database If Not Exists", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether to create the
database when it does not exis [...]
- "databaseEndpoint": { "index": 10, "kind": "parameter", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": true,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure. [...]
+ "databaseEndpoint": { "index": 10, "kind": "parameter", "displayName":
"Database Endpoint", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The URI of the Azure
Cosmos DB account, for example https:\/\/myaccount.documents.azure [...]
"multipleWriteRegionsEnabled": { "index": 11, "kind": "parameter",
"displayName": "Multiple Write Regions Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client sends
writes to any writable r [...]
"preferredRegions": { "index": 12, "kind": "parameter", "displayName":
"Preferred Regions", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "A comma-separated list
of the preferred regions of a geo-replicated account, in order o [...]
"readRequestsFallbackEnabled": { "index": 13, "kind": "parameter",
"displayName": "Read Requests Fallback Enabled", "group": "common", "label":
"common", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "Whether the client can
send reads to the other re [...]
@@ -91,8 +116,8 @@
"operation": { "index": 26, "kind": "parameter", "displayName":
"Operation", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition",
"enum": [ "listDatabases", "createDatabase", "queryDatabases",
"deleteDatabase", "createContainer", "replaceDatabaseThroughput",
"listContainers", "queryContainers", "deleteContainer",
"replaceContainerThroughput", "createItem", "upsertItem", "dele [...]
"query": { "index": 27, "kind": "parameter", "displayName": "Query",
"group": "producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The SQL query of
queryDatabases, queryContainers and queryItems, for example SELECT * FROM c
WHERE c.id = [...]
"queryRequestOptions": { "index": 28, "kind": "parameter", "displayName":
"Query Request Options", "group": "producer", "label": "producer", "required":
false, "type": "object", "javaType":
"com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.CosmosQueryRequ [...]
- "lazyStartProducer": { "index": 29, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "indexingPolicy": { "index": 30, "kind": "parameter", "displayName":
"Indexing Policy", "group": " advanced", "label": "common, advanced",
"required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of a containe [...]
+ "indexingPolicy": { "index": 29, "kind": "parameter", "displayName":
"Indexing Policy", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "object", "javaType":
"com.azure.cosmos.models.IndexingPolicy", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The
com.azure.cosmos.models.IndexingPolicy of [...]
+ "lazyStartProducer": { "index": 30, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"accountKey": { "index": 31, "kind": "parameter", "displayName": "Account
Key", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationField": "configuration", "description": "The key of the Azure
Cosmos DB account, a read-write key or a read-only ke [...]
"credentialType": { "index": 32, "kind": "parameter", "displayName":
"Credential Type", "group": "security", "label": "security", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.azure.common.CredentialType", "enum": [
"SHARED_ACCOUNT_KEY", "AZURE_IDENTITY" ], "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "SHARED_ACCOUNT_KEY",
"configurationClass":
"org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration",
"configurationFi [...]
}
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
b/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
index 04002dff2ab8..76ef599739c1 100644
---
a/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
+++
b/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
@@ -21,7 +21,7 @@ component interacts with Azure CosmosDB through Azure SQL API.
Prerequisites
-You must have a valid Windows Azure Storage account. More information is
available at
+You must have a valid Azure Cosmos DB account. More information is available at
https://docs.microsoft.com/azure/[Azure Documentation Portal].
@@ -86,43 +86,6 @@ and UP once it has started. It does not follow what the
change feed processor do
consumer check, camel-health asks it only for a route that starts with the
CamelContext, and
`camel.health.exclude-pattern=consumer:<routeId>` leaves it out.
-=== Message headers evaluated by the component producer
-[width="100%",cols="10%,10%,10%,70%",options="header",]
-|=======================================================================
-|Header |Variable Name |Type |Description
-
-|`CamelAzureCosmosDbDatabaseName`| `CosmosDbConstants.DATABASE_NAME`|`String`|
Overrides the database name which is the name of the Cosmos database that
component should connect to. In case you are producing data and have
createDatabaseIfNotExists=true, the component will automatically auto create a
Cosmos database.
-|`CamelAzureCosmosDbContainerName`|
`CosmosDbConstants.CONTAINER_NAME`|`String`| Overrides the container name which
is the name of the Cosmos container that component should connect to. In case
you are producing data and have createContainerIfNotExists=true, the component
will automatically auto create a Cosmos container.
-|`CamelAzureCosmosDbOperation`|
`CosmosDbConstants.OPERATION`|`CosmosDbOperationsDefinition`| Set the producer
operation which can be used to execute a specific operation on the producer.
-|`CamelAzureCosmosDbQuery`| `CosmosDbConstants.QUERY`|`String`| Set the SQL
query to execute on a given producer query operations.
-|`CamelAzureCosmosDbQueryRequestOptions`|
`CosmosDbConstants.QUERY_REQUEST_OPTIONS`|`CosmosQueryRequestOptions`| Set
additional QueryRequestOptions that can be used with queryItems,
queryContainers, queryDatabases, listDatabases, listItems, listContainers
operations.
-|`CamelAzureCosmosDbCreateDatabaseIfNotExist`|
`CosmosDbConstants.CREATE_DATABASE_IF_NOT_EXIST`|`boolean`| Sets if the
component should create the Cosmos database automatically in case it doesn't
exist in the Cosmos account.
-|`CamelAzureCosmosDbCreateContainerIfNotExist`|
`CosmosDbConstants.CREATE_CONTAINER_IF_NOT_EXIST`|`boolean`| Sets if the
component should create Cosmos container automatically in case it doesn't exist
in the Cosmos account.
-|`CamelAzureCosmosDbThroughputProperties`|
`CosmosDbConstants.THROUGHPUT_PROPERTIES`|`ThroughputProperties`| Sets
throughput of the resources in the Azure Cosmos DB service.
-|`CamelAzureCosmosDbDatabaseRequestOptions`|
`CosmosDbConstants.DATABASE_REQUEST_OPTIONS`|`CosmosDatabaseRequestOptions`|
Sets additional options to execute on database operations.
-|`CamelAzureCosmosDbContainerPartitionKeyPath`|
`CosmosDbConstants.CONTAINER_PARTITION_KEY_PATH`|`String`| Set the container
partition key path.
-|`CamelAzureCosmosDbContainerRequestOptions`|
`CosmosDbConstants.CONTAINER_REQUEST_OPTIONS`|`CosmosContainerRequestOptions`|
Set additional options to execute on container operations.
-|`CamelAzureCosmosDbItemPartitionKey`|
`CosmosDbConstants.ITEM_PARTITION_KEY`|`String`| Set the partition key.
Represents a partition key value in the Azure Cosmos DB database service. A
partition key identifies the partition where the item is stored in.
-|`CamelAzureCosmosDbItemRequestOptions`|
`CosmosDbConstants.ITEM_REQUEST_OPTIONS`|`CosmosItemRequestOptions`| Set
additional options to execute on item operations.
-|`CamelAzureCosmosDbItemId`| `CosmosDbConstants.ITEM_ID`|`String`| Set the
itemId in case needed for operation on item like _delete_, _replace_.
-|=======================================================================
-
-
-=== Message headers set by the component producer
-[width="100%",cols="10%,10%,10%,70%",options="header",]
-|=======================================================================
-|Header |Variable Name |Type |Description
-
-|`CamelAzureCosmosDbRecourseId`| `CosmosDbConstants.RESOURCE_ID`|`String`| The
resource ID of the requested resource.
-|`CamelAzureCosmosDbEtag`| `CosmosDbConstants.E_TAG`|`String`| The Etag ID of
the requested resource.
-|`CamelAzureCosmosDbTimestamp`| `CosmosDbConstants.TIMESTAMP`|`String`| The
timestamp of the requested resource.
-|`CamelAzureCosmosDbResponseHeaders`|
`CosmosDbConstants.RESPONSE_HEADERS`|`Map`| The response headers of the
requested resource.
-|`CamelAzureCosmosDbStatusCode`| `CosmosDbConstants.STATUS_CODE`|`Integer`|
The status code of the requested resource.
-|`CamelAzureCosmosDbDefaultTimeToLiveInSeconds`|
`CosmosDbConstants.DEFAULT_TIME_TO_LIVE_SECONDS`|`Integer`| The TTL of the
requested resource.
-|`CamelAzureCosmosDbManualThroughput`|
`CosmosDbConstants.MANUAL_THROUGHPUT`|`Integer`| The manual throughput of the
requested resource.
-|`CamelAzureCosmosDbAutoscaleMaxThroughput`|
`CosmosDbConstants.AUTOSCALE_MAX_THROUGHPUT`|`Integer`| The
AutoscaleMaxThroughput of the requested resource.
-|=======================================================================
-
=== Azure CosmosDB Producer operations
Camel Azure CosmosDB component provides a wide range of operations on the
producer side:
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfiguration.java
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfiguration.java
index 827d0cf57c10..65162ae37dd6 100644
---
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfiguration.java
+++
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfiguration.java
@@ -51,7 +51,6 @@ public class CosmosDbConfiguration implements Cloneable {
@UriParam(label = "common",
description = "The URI of the Azure Cosmos DB account, for
example https://myaccount.documents.azure.com:443/."
+ " Required unless the cosmosAsyncClient option
is set, which replaces it.")
- @Metadata(required = true)
private String databaseEndpoint;
@UriParam(label = "common",
description = "The partition key path of a container that the
component creates, for example /myPartitionKey."
@@ -67,7 +66,7 @@ public class CosmosDbConfiguration implements Cloneable {
+ " options are not used. The endpoint does not
close a client that is set or autowired.")
@Metadata(autowired = true)
private CosmosAsyncClient cosmosAsyncClient;
- @UriParam(label = "common", defaultValue = "SESSION",
+ @UriParam(label = "common", defaultValue = "Session",
description = "The default consistency level of the requests of
the client. It must be the same as or weaker"
+ " than the default consistency level of the
account. From the strongest to the weakest: Strong,"
+ " BoundedStaleness, Session, ConsistentPrefix
and Eventual.")
@@ -78,8 +77,10 @@ public class CosmosDbConfiguration implements Cloneable {
+ " available region of this list.")
private String preferredRegions;
@UriParam(label = "common", defaultValue = "false",
- description = "Whether to enable client telemetry. This has no
effect: the azure-cosmos SDK ignores this flag,"
- + " as it can no longer send client telemetry to
the service.")
+ description = "Whether to enable client telemetry.")
+ @Metadata(deprecationNote = "Has no effect: the azure-cosmos SDK ignores
this flag, as it can no longer send client"
+ + " telemetry to the service.")
+ @Deprecated
private boolean clientTelemetryEnabled;
@UriParam(label = "common", defaultValue = "false",
description = "Whether the client shares its connections in
Direct mode with the other clients of the JVM that"
@@ -114,7 +115,7 @@ public class CosmosDbConfiguration implements Cloneable {
+ " operation on items except deleteItem. The
CamelAzureCosmosDbCreateContainerIfNotExist header"
+ " replaces it for the producer.")
private boolean createContainerIfNotExists;
- @UriParam(label = "common, advanced",
+ @UriParam(label = "producer,advanced",
description = "The com.azure.cosmos.models.IndexingPolicy of a
container that the producer creates, with"
+ " createContainer or because
createContainerIfNotExists is true. If not set, the container gets"
+ " the default indexing policy of Cosmos DB. The
CamelAzureCosmosDbIndexingPolicy header replaces"
@@ -319,10 +320,16 @@ public class CosmosDbConfiguration implements Cloneable {
this.preferredRegions = preferredRegions;
}
+ /**
+ * @deprecated Has no effect: the azure-cosmos SDK ignores this flag, as
it can no longer send client telemetry to
+ * the service.
+ */
+ @Deprecated
public boolean isClientTelemetryEnabled() {
return clientTelemetryEnabled;
}
+ @Deprecated
public void setClientTelemetryEnabled(boolean clientTelemetryEnabled) {
this.clientTelemetryEnabled = clientTelemetryEnabled;
}
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfigurationOptionsProxy.java
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfigurationOptionsProxy.java
index 19f7072f1dba..a0b9a912daf7 100644
---
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfigurationOptionsProxy.java
+++
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConfigurationOptionsProxy.java
@@ -117,6 +117,13 @@ public class CosmosDbConfigurationOptionsProxy {
}
public PartitionKey getItemPartitionKey(final Exchange exchange) {
+ // a PartitionKey is used as it is, such as for a partition key value
that is a number or a boolean: converted to
+ // a String it would be the JSON of the partition key
+ final Object header = ObjectHelper.isEmpty(exchange)
+ ? null :
exchange.getIn().getHeader(CosmosDbConstants.ITEM_PARTITION_KEY);
+ if (header instanceof PartitionKey partitionKey) {
+ return partitionKey;
+ }
return new PartitionKey(
getOption(exchange, CosmosDbConstants.ITEM_PARTITION_KEY,
configuration::getItemPartitionKey,
String.class));
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConstants.java
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConstants.java
index 12c219861912..aa66bb62f300 100644
---
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConstants.java
+++
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbConstants.java
@@ -16,34 +16,117 @@
*/
package org.apache.camel.component.azure.cosmosdb;
+import org.apache.camel.spi.Metadata;
+
public final class CosmosDbConstants {
private static final String HEADER_PREFIX = "CamelAzureCosmosDb";
// headers evaluated by the producer only
+ @Metadata(label = "producer", description = "The name of the database.
Replaces the databaseName option.",
+ javaType = "String")
public static final String DATABASE_NAME = HEADER_PREFIX + "DatabaseName";
+ @Metadata(label = "producer", description = "The name of the container.
Replaces the containerName option.",
+ javaType = "String")
public static final String CONTAINER_NAME = HEADER_PREFIX +
"ContainerName";
+ @Metadata(label = "producer", description = "The operation that the
producer performs. Replaces the operation option.",
+ javaType =
"org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition")
public static final String OPERATION = HEADER_PREFIX + "Operation";
+ @Metadata(label = "producer",
+ description = "The SQL query of queryDatabases, queryContainers
and queryItems. Replaces the query option.",
+ javaType = "String")
public static final String QUERY = HEADER_PREFIX + "Query";
+ @Metadata(label = "producer",
+ description = "The options of queryDatabases, listContainers,
queryContainers, readAllItems and queryItems."
+ + " Replaces the queryRequestOptions option.",
+ javaType = "com.azure.cosmos.models.CosmosQueryRequestOptions")
public static final String QUERY_REQUEST_OPTIONS = HEADER_PREFIX +
"QueryRequestOptions";
+ @Metadata(label = "producer",
+ description = "Whether to create the database when it does not
exist. Replaces the createDatabaseIfNotExists"
+ + " option.",
+ javaType = "Boolean")
public static final String CREATE_DATABASE_IF_NOT_EXIST = HEADER_PREFIX +
"CreateDatabaseIfNotExist";
+ @Metadata(label = "producer",
+ description = "Whether to create the container when it does not
exist. Replaces the createContainerIfNotExists"
+ + " option.",
+ javaType = "Boolean")
public static final String CREATE_CONTAINER_IF_NOT_EXIST = HEADER_PREFIX +
"CreateContainerIfNotExist";
+ @Metadata(label = "producer",
+ description = "The indexing policy of a container that the
producer creates. Replaces the indexingPolicy"
+ + " option.",
+ javaType = "com.azure.cosmos.models.IndexingPolicy")
public static final String INDEXING_POLICY = HEADER_PREFIX +
"IndexingPolicy";
+ @Metadata(label = "producer",
+ description = "The throughput of a database or container that
the producer creates, and the new throughput"
+ + " of replaceDatabaseThroughput and
replaceContainerThroughput. Replaces the"
+ + " throughputProperties option.",
+ javaType = "com.azure.cosmos.models.ThroughputProperties")
public static final String THROUGHPUT_PROPERTIES = HEADER_PREFIX +
"ThroughputProperties";
+ @Metadata(label = "producer", description = "The request options of
deleteDatabase.",
+ javaType =
"com.azure.cosmos.models.CosmosDatabaseRequestOptions")
public static final String DATABASE_REQUEST_OPTIONS = HEADER_PREFIX +
"DatabaseRequestOptions";
+ @Metadata(label = "producer",
+ description = "The partition key path of a container that the
producer creates. Replaces the"
+ + " containerPartitionKeyPath option.",
+ javaType = "String")
public static final String CONTAINER_PARTITION_KEY_PATH = HEADER_PREFIX +
"ContainerPartitionKeyPath";
+ @Metadata(label = "producer", description = "The request options of
deleteContainer.",
+ javaType =
"com.azure.cosmos.models.CosmosContainerRequestOptions")
public static final String CONTAINER_REQUEST_OPTIONS = HEADER_PREFIX +
"ContainerRequestOptions";
+ @Metadata(label = "producer",
+ description = "The value of the partition key of the item for
createItem, upsertItem, replaceItem, deleteItem"
+ + " and readItem, and of the items that
readAllItems reads. Replaces the itemPartitionKey"
+ + " option. A com.azure.cosmos.models.PartitionKey
is used as it is, for example for a partition"
+ + " key value that is a number or a boolean; any
other value is converted to a String.",
+ javaType = "String or com.azure.cosmos.models.PartitionKey")
public static final String ITEM_PARTITION_KEY = HEADER_PREFIX +
"ItemPartitionKey";
+ @Metadata(label = "producer",
+ description = "The request options of createItem, upsertItem,
replaceItem, deleteItem and readItem.",
+ javaType = "com.azure.cosmos.models.CosmosItemRequestOptions")
public static final String ITEM_REQUEST_OPTIONS = HEADER_PREFIX +
"ItemRequestOptions";
+ @Metadata(label = "producer",
+ description = "The id of the item for readItem, replaceItem and
deleteItem. Replaces the itemId option.",
+ javaType = "String")
public static final String ITEM_ID = HEADER_PREFIX + "ItemId";
// headers set by the producer
- public static final String RESOURCE_ID = HEADER_PREFIX + "RecourseId";
+ @Metadata(label = "producer",
+ description = "The resource id of the database or container, set
by the operations on a database or a"
+ + " container that get its properties back, such
as createDatabase and createContainer.",
+ javaType = "String")
+ public static final String RESOURCE_ID = HEADER_PREFIX + "ResourceId";
+ @Metadata(label = "producer",
+ description = "The entity tag of the database, container,
throughput or item that the operation returns.",
+ javaType = "String")
public static final String E_TAG = HEADER_PREFIX + "Etag";
+ @Metadata(label = "producer",
+ description = "The time of the last update of the database,
container or throughput that the operation"
+ + " returns.",
+ javaType = "java.time.Instant")
public static final String TIMESTAMP = HEADER_PREFIX + "Timestamp";
+ @Metadata(label = "producer",
+ description = "The headers of the response of Cosmos DB, for all
operations except listDatabases,"
+ + " queryDatabases, listContainers,
queryContainers, readAllItems and queryItems.",
+ javaType = "Map<String, String>")
public static final String RESPONSE_HEADERS = HEADER_PREFIX +
"ResponseHeaders";
+ @Metadata(label = "producer",
+ description = "The HTTP status code of the response of Cosmos
DB, for all operations except listDatabases,"
+ + " queryDatabases, listContainers,
queryContainers, readAllItems and queryItems.",
+ javaType = "Integer")
public static final String STATUS_CODE = HEADER_PREFIX + "StatusCode";
+ @Metadata(label = "producer",
+ description = "The default time to live of the items of the
container, in seconds, set by the operations on"
+ + " a container that get its properties back, such
as createContainer.",
+ javaType = "Integer")
public static final String DEFAULT_TIME_TO_LIVE_SECONDS = HEADER_PREFIX +
"DefaultTimeToLiveInSeconds";
+ @Metadata(label = "producer",
+ description = "The manual throughput, in request units per
second, after replaceDatabaseThroughput or"
+ + " replaceContainerThroughput.",
+ javaType = "Integer")
public static final String MANUAL_THROUGHPUT = HEADER_PREFIX +
"ManualThroughput";
+ @Metadata(label = "producer",
+ description = "The maximum autoscale throughput, in request
units per second, after"
+ + " replaceDatabaseThroughput or
replaceContainerThroughput.",
+ javaType = "Integer")
public static final String AUTOSCALE_MAX_THROUGHPUT = HEADER_PREFIX +
"AutoscaleMaxThroughput";
private CosmosDbConstants() {
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbEndpoint.java
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbEndpoint.java
index 2c92a366ff62..b3ad3250f532 100644
---
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbEndpoint.java
+++
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/CosmosDbEndpoint.java
@@ -39,7 +39,8 @@ import org.apache.camel.util.ObjectHelper;
*/
@UriEndpoint(firstVersion = "3.10.0", scheme = "azure-cosmosdb", title =
"Azure CosmosDB",
syntax = "azure-cosmosdb:databaseName/containerName", category = {
- Category.CLOUD, Category.DATABASE })
+ Category.CLOUD, Category.DATABASE },
+ headersClass = CosmosDbConstants.class)
@BodyTypes(consumerOut = @BodyType(value = Carrier.LIST, javaType =
"java.util.List<java.util.Map<String, Object>>",
description = "The items of one batch of
the change feed: a List with a Map per item"
+ " created or changed, with
the system fields of Cosmos DB such as _etag and"
diff --git
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/CosmosDbItemPartitionKeyTest.java
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/CosmosDbItemPartitionKeyTest.java
new file mode 100644
index 000000000000..70d4baa5a9bf
--- /dev/null
+++
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/CosmosDbItemPartitionKeyTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.azure.cosmosdb;
+
+import com.azure.cosmos.models.PartitionKey;
+import org.apache.camel.Exchange;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+
+/**
+ * The partition key of the item operations comes from the
CamelAzureCosmosDbItemPartitionKey header or the
+ * itemPartitionKey option. A PartitionKey header is used as it is; any other
value is converted to a String.
+ */
+class CosmosDbItemPartitionKeyTest extends CamelTestSupport {
+
+ private final CosmosDbConfiguration configuration = new
CosmosDbConfiguration();
+ private final CosmosDbConfigurationOptionsProxy proxy = new
CosmosDbConfigurationOptionsProxy(configuration);
+
+ @Test
+ void partitionKeyHeaderIsUsedAsItIs() {
+ Exchange exchange = new DefaultExchange(context);
+
+ exchange.getIn().setHeader(CosmosDbConstants.ITEM_PARTITION_KEY, new
PartitionKey(5));
+ assertEquals(new PartitionKey(5), proxy.getItemPartitionKey(exchange));
+ assertNotEquals(new PartitionKey("5"),
proxy.getItemPartitionKey(exchange));
+
+ exchange.getIn().setHeader(CosmosDbConstants.ITEM_PARTITION_KEY, new
PartitionKey(true));
+ assertEquals(new PartitionKey(true),
proxy.getItemPartitionKey(exchange));
+
+ exchange.getIn().setHeader(CosmosDbConstants.ITEM_PARTITION_KEY, new
PartitionKey("a"));
+ assertEquals(new PartitionKey("a"),
proxy.getItemPartitionKey(exchange));
+ }
+
+ @Test
+ void otherValuesAreConvertedToString() {
+ Exchange exchange = new DefaultExchange(context);
+ configuration.setItemPartitionKey("b");
+ assertEquals(new PartitionKey("b"),
proxy.getItemPartitionKey(exchange));
+
+ exchange.getIn().setHeader(CosmosDbConstants.ITEM_PARTITION_KEY, "a");
+ assertEquals(new PartitionKey("a"),
proxy.getItemPartitionKey(exchange));
+
+ exchange.getIn().setHeader(CosmosDbConstants.ITEM_PARTITION_KEY, 5);
+ assertEquals(new PartitionKey("5"),
proxy.getItemPartitionKey(exchange));
+ }
+}
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index e28aac45d6df..bd6144c741a0 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -4128,6 +4128,22 @@ the initial state (`camel.health.initial-state`, DOWN by
default) while the firs
the change feed processor cannot start, with the failure of the last attempt;
before, it was UP. To leave
the check out, as before, set
`camel.health.exclude-pattern=consumer:<routeId>`.
+=== camel-azure-cosmosdb - the CamelAzureCosmosDbRecourseId header is renamed
to CamelAzureCosmosDbResourceId
+
+The header that the producer sets to the resource id of a database or
container is renamed from
+`CamelAzureCosmosDbRecourseId` to `CamelAzureCosmosDbResourceId`. Code that
uses the Java constant
+`CosmosDbConstants.RESOURCE_ID` is not affected. Routes that use the header
name as text, for example in XML or YAML
+routes or in a Simple expression, must use the new name.
+
+The headers of the component are now in the catalog and the Endpoint DSL, with
the method `azureCosmosDbResourceId()`
+for the renamed header. Other changes:
+
+* A `com.azure.cosmos.models.PartitionKey` in the
`CamelAzureCosmosDbItemPartitionKey` header is used as it is, for
+ example for a partition key value that is a number. Before, it was converted
to its JSON text, which then was used
+ as a String partition key value. Other header values are still converted to
a String.
+* The `clientTelemetryEnabled` option is deprecated, as the azure-cosmos SDK
ignores it.
+* In the Endpoint DSL, `indexingPolicy` is now an option of the producer
builders only, as the consumer does not use it.
+
=== camel-vertx-websocket - a consumeAsClient consumer routes the messages in
the order they are received
A `vertx-websocket` consumer with `consumeAsClient=true` used to route the
received messages in parallel, on the
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
index a9c7ec192dc1..41d48945ee3d 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
@@ -54,9 +54,9 @@ public interface AzureCosmosdbComponentBuilderFactory {
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option is a: <code>boolean</code> type.
*
@@ -66,6 +66,7 @@ public interface AzureCosmosdbComponentBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default AzureCosmosdbComponentBuilder clientTelemetryEnabled(boolean
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
@@ -120,7 +121,7 @@ public interface AzureCosmosdbComponentBuilderFactory {
* The option is a:
* <code>com.azure.cosmos.ConsistencyLevel</code> type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -602,7 +603,7 @@ public interface AzureCosmosdbComponentBuilderFactory {
* The option is a:
* <code>com.azure.cosmos.models.IndexingPolicy</code>
type.
*
- * Group: advanced
+ * Group: producer (advanced)
*
* @param indexingPolicy the value to set
* @return the dsl builder
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
index 61f6c6c979a0..3bebc82bced5 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
@@ -818,6 +818,20 @@ public class EndpointHeaderBuilders {
public static Translate2EndpointBuilderFactory.Translate2HeaderNameBuilder
aws2Translate() {
return
Translate2EndpointBuilderFactory.Translate2HeaderNameBuilder.INSTANCE;
}
+ /**
+ * Azure CosmosDB (camel-azure-cosmosdb)
+ * Store, read and query items in Azure Cosmos DB, and receive the changes
+ * of a container from its change feed.
+ *
+ * Category: cloud,database
+ * Since: 3.10
+ * Maven coordinates: org.apache.camel:camel-azure-cosmosdb
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ public static CosmosDbEndpointBuilderFactory.CosmosDbHeaderNameBuilder
azureCosmosdb() {
+ return
CosmosDbEndpointBuilderFactory.CosmosDbHeaderNameBuilder.INSTANCE;
+ }
/**
* Azure Event Grid (camel-azure-eventgrid)
* Send events to Azure Event Grid topics.
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
index c830f5863923..feeac3408485 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
@@ -45,9 +45,9 @@ public interface CosmosDbEndpointBuilderFactory {
return (AdvancedCosmosDbEndpointConsumerBuilder) this;
}
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option is a: <code>boolean</code> type.
*
@@ -57,14 +57,15 @@ public interface CosmosDbEndpointBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default CosmosDbEndpointConsumerBuilder clientTelemetryEnabled(boolean
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
}
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -74,6 +75,7 @@ public interface CosmosDbEndpointBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default CosmosDbEndpointConsumerBuilder clientTelemetryEnabled(String
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
@@ -124,7 +126,7 @@ public interface CosmosDbEndpointBuilderFactory {
*
* The option is a: <code>com.azure.cosmos.ConsistencyLevel</code>
type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -143,7 +145,7 @@ public interface CosmosDbEndpointBuilderFactory {
* The option will be converted to a
* <code>com.azure.cosmos.ConsistencyLevel</code> type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -340,7 +342,6 @@ public interface CosmosDbEndpointBuilderFactory {
*
* The option is a: <code>java.lang.String</code> type.
*
- * Required: true
* Group: common
*
* @param databaseEndpoint the value to set
@@ -820,46 +821,6 @@ public interface CosmosDbEndpointBuilderFactory {
doSetProperty("exchangePattern", exchangePattern);
return this;
}
- /**
- * The com.azure.cosmos.models.IndexingPolicy of a container that the
- * producer creates, with createContainer or because
- * createContainerIfNotExists is true. If not set, the container gets
- * the default indexing policy of Cosmos DB. The
- * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
- * does not use it.
- *
- * The option is a: <code>com.azure.cosmos.models.IndexingPolicy</code>
- * type.
- *
- * Group: advanced
- *
- * @param indexingPolicy the value to set
- * @return the dsl builder
- */
- default AdvancedCosmosDbEndpointConsumerBuilder
indexingPolicy(com.azure.cosmos.models.IndexingPolicy indexingPolicy) {
- doSetProperty("indexingPolicy", indexingPolicy);
- return this;
- }
- /**
- * The com.azure.cosmos.models.IndexingPolicy of a container that the
- * producer creates, with createContainer or because
- * createContainerIfNotExists is true. If not set, the container gets
- * the default indexing policy of Cosmos DB. The
- * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
- * does not use it.
- *
- * The option will be converted to a
- * <code>com.azure.cosmos.models.IndexingPolicy</code> type.
- *
- * Group: advanced
- *
- * @param indexingPolicy the value to set
- * @return the dsl builder
- */
- default AdvancedCosmosDbEndpointConsumerBuilder indexingPolicy(String
indexingPolicy) {
- doSetProperty("indexingPolicy", indexingPolicy);
- return this;
- }
}
/**
@@ -873,9 +834,9 @@ public interface CosmosDbEndpointBuilderFactory {
}
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option is a: <code>boolean</code> type.
*
@@ -885,14 +846,15 @@ public interface CosmosDbEndpointBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default CosmosDbEndpointProducerBuilder clientTelemetryEnabled(boolean
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
}
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -902,6 +864,7 @@ public interface CosmosDbEndpointBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default CosmosDbEndpointProducerBuilder clientTelemetryEnabled(String
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
@@ -952,7 +915,7 @@ public interface CosmosDbEndpointBuilderFactory {
*
* The option is a: <code>com.azure.cosmos.ConsistencyLevel</code>
type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -971,7 +934,7 @@ public interface CosmosDbEndpointBuilderFactory {
* The option will be converted to a
* <code>com.azure.cosmos.ConsistencyLevel</code> type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -1168,7 +1131,6 @@ public interface CosmosDbEndpointBuilderFactory {
*
* The option is a: <code>java.lang.String</code> type.
*
- * Required: true
* Group: common
*
* @param databaseEndpoint the value to set
@@ -1494,6 +1456,46 @@ public interface CosmosDbEndpointBuilderFactory {
return (CosmosDbEndpointProducerBuilder) this;
}
+ /**
+ * The com.azure.cosmos.models.IndexingPolicy of a container that the
+ * producer creates, with createContainer or because
+ * createContainerIfNotExists is true. If not set, the container gets
+ * the default indexing policy of Cosmos DB. The
+ * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
+ * does not use it.
+ *
+ * The option is a: <code>com.azure.cosmos.models.IndexingPolicy</code>
+ * type.
+ *
+ * Group: producer (advanced)
+ *
+ * @param indexingPolicy the value to set
+ * @return the dsl builder
+ */
+ default AdvancedCosmosDbEndpointProducerBuilder
indexingPolicy(com.azure.cosmos.models.IndexingPolicy indexingPolicy) {
+ doSetProperty("indexingPolicy", indexingPolicy);
+ return this;
+ }
+ /**
+ * The com.azure.cosmos.models.IndexingPolicy of a container that the
+ * producer creates, with createContainer or because
+ * createContainerIfNotExists is true. If not set, the container gets
+ * the default indexing policy of Cosmos DB. The
+ * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
+ * does not use it.
+ *
+ * The option will be converted to a
+ * <code>com.azure.cosmos.models.IndexingPolicy</code> type.
+ *
+ * Group: producer (advanced)
+ *
+ * @param indexingPolicy the value to set
+ * @return the dsl builder
+ */
+ default AdvancedCosmosDbEndpointProducerBuilder indexingPolicy(String
indexingPolicy) {
+ doSetProperty("indexingPolicy", indexingPolicy);
+ return this;
+ }
/**
* Whether the producer should be started lazy (on the first message).
* By starting lazy you can use this to allow CamelContext and routes
to
@@ -1540,46 +1542,6 @@ public interface CosmosDbEndpointBuilderFactory {
doSetProperty("lazyStartProducer", lazyStartProducer);
return this;
}
- /**
- * The com.azure.cosmos.models.IndexingPolicy of a container that the
- * producer creates, with createContainer or because
- * createContainerIfNotExists is true. If not set, the container gets
- * the default indexing policy of Cosmos DB. The
- * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
- * does not use it.
- *
- * The option is a: <code>com.azure.cosmos.models.IndexingPolicy</code>
- * type.
- *
- * Group: advanced
- *
- * @param indexingPolicy the value to set
- * @return the dsl builder
- */
- default AdvancedCosmosDbEndpointProducerBuilder
indexingPolicy(com.azure.cosmos.models.IndexingPolicy indexingPolicy) {
- doSetProperty("indexingPolicy", indexingPolicy);
- return this;
- }
- /**
- * The com.azure.cosmos.models.IndexingPolicy of a container that the
- * producer creates, with createContainer or because
- * createContainerIfNotExists is true. If not set, the container gets
- * the default indexing policy of Cosmos DB. The
- * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
- * does not use it.
- *
- * The option will be converted to a
- * <code>com.azure.cosmos.models.IndexingPolicy</code> type.
- *
- * Group: advanced
- *
- * @param indexingPolicy the value to set
- * @return the dsl builder
- */
- default AdvancedCosmosDbEndpointProducerBuilder indexingPolicy(String
indexingPolicy) {
- doSetProperty("indexingPolicy", indexingPolicy);
- return this;
- }
}
/**
@@ -1594,9 +1556,9 @@ public interface CosmosDbEndpointBuilderFactory {
}
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option is a: <code>boolean</code> type.
*
@@ -1606,14 +1568,15 @@ public interface CosmosDbEndpointBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default CosmosDbEndpointBuilder clientTelemetryEnabled(boolean
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
}
/**
- * Whether to enable client telemetry. This has no effect: the
- * azure-cosmos SDK ignores this flag, as it can no longer send client
- * telemetry to the service.
+ * Whether to enable client telemetry. Deprecation note: Has no effect:
+ * the azure-cosmos SDK ignores this flag, as it can no longer send
+ * client telemetry to the service.
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -1623,6 +1586,7 @@ public interface CosmosDbEndpointBuilderFactory {
* @param clientTelemetryEnabled the value to set
* @return the dsl builder
*/
+ @Deprecated
default CosmosDbEndpointBuilder clientTelemetryEnabled(String
clientTelemetryEnabled) {
doSetProperty("clientTelemetryEnabled", clientTelemetryEnabled);
return this;
@@ -1673,7 +1637,7 @@ public interface CosmosDbEndpointBuilderFactory {
*
* The option is a: <code>com.azure.cosmos.ConsistencyLevel</code>
type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -1692,7 +1656,7 @@ public interface CosmosDbEndpointBuilderFactory {
* The option will be converted to a
* <code>com.azure.cosmos.ConsistencyLevel</code> type.
*
- * Default: SESSION
+ * Default: Session
* Group: common
*
* @param consistencyLevel the value to set
@@ -1889,7 +1853,6 @@ public interface CosmosDbEndpointBuilderFactory {
*
* The option is a: <code>java.lang.String</code> type.
*
- * Required: true
* Group: common
*
* @param databaseEndpoint the value to set
@@ -2095,49 +2058,23 @@ public interface CosmosDbEndpointBuilderFactory {
return (CosmosDbEndpointBuilder) this;
}
+ }
+
+ public interface CosmosDbBuilders {
/**
- * The com.azure.cosmos.models.IndexingPolicy of a container that the
- * producer creates, with createContainer or because
- * createContainerIfNotExists is true. If not set, the container gets
- * the default indexing policy of Cosmos DB. The
- * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
- * does not use it.
- *
- * The option is a: <code>com.azure.cosmos.models.IndexingPolicy</code>
- * type.
- *
- * Group: advanced
- *
- * @param indexingPolicy the value to set
- * @return the dsl builder
- */
- default AdvancedCosmosDbEndpointBuilder
indexingPolicy(com.azure.cosmos.models.IndexingPolicy indexingPolicy) {
- doSetProperty("indexingPolicy", indexingPolicy);
- return this;
- }
- /**
- * The com.azure.cosmos.models.IndexingPolicy of a container that the
- * producer creates, with createContainer or because
- * createContainerIfNotExists is true. If not set, the container gets
- * the default indexing policy of Cosmos DB. The
- * CamelAzureCosmosDbIndexingPolicy header replaces it, and the
consumer
- * does not use it.
- *
- * The option will be converted to a
- * <code>com.azure.cosmos.models.IndexingPolicy</code> type.
+ * Azure CosmosDB (camel-azure-cosmosdb)
+ * Store, read and query items in Azure Cosmos DB, and receive the
+ * changes of a container from its change feed.
*
- * Group: advanced
+ * Category: cloud,database
+ * Since: 3.10
+ * Maven coordinates: org.apache.camel:camel-azure-cosmosdb
*
- * @param indexingPolicy the value to set
- * @return the dsl builder
+ * @return the dsl builder for the headers' name.
*/
- default AdvancedCosmosDbEndpointBuilder indexingPolicy(String
indexingPolicy) {
- doSetProperty("indexingPolicy", indexingPolicy);
- return this;
+ default CosmosDbHeaderNameBuilder azureCosmosdb() {
+ return CosmosDbHeaderNameBuilder.INSTANCE;
}
- }
-
- public interface CosmosDbBuilders {
/**
* Azure CosmosDB (camel-azure-cosmosdb)
* Store, read and query items in Azure Cosmos DB, and receive the
@@ -2198,6 +2135,338 @@ public interface CosmosDbEndpointBuilderFactory {
}
}
+ /**
+ * The builder of headers' name for the Azure CosmosDB component.
+ */
+ public static class CosmosDbHeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ public static final CosmosDbHeaderNameBuilder INSTANCE = new
CosmosDbHeaderNameBuilder();
+
+ /**
+ * The name of the database. Replaces the databaseName option.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbDatabaseName}.
+ */
+ public String azureCosmosDbDatabaseName() {
+ return "CamelAzureCosmosDbDatabaseName";
+ }
+ /**
+ * The name of the container. Replaces the containerName option.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbContainerName}.
+ */
+ public String azureCosmosDbContainerName() {
+ return "CamelAzureCosmosDbContainerName";
+ }
+ /**
+ * The operation that the producer performs. Replaces the operation
+ * option.
+ *
+ * The option is a: {@code
+ *
org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbOperation}.
+ */
+ public String azureCosmosDbOperation() {
+ return "CamelAzureCosmosDbOperation";
+ }
+ /**
+ * The SQL query of queryDatabases, queryContainers and queryItems.
+ * Replaces the query option.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbQuery}.
+ */
+ public String azureCosmosDbQuery() {
+ return "CamelAzureCosmosDbQuery";
+ }
+ /**
+ * The options of queryDatabases, listContainers, queryContainers,
+ * readAllItems and queryItems. Replaces the queryRequestOptions
option.
+ *
+ * The option is a: {@code
+ * com.azure.cosmos.models.CosmosQueryRequestOptions} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbQueryRequestOptions}.
+ */
+ public String azureCosmosDbQueryRequestOptions() {
+ return "CamelAzureCosmosDbQueryRequestOptions";
+ }
+ /**
+ * Whether to create the database when it does not exist. Replaces the
+ * createDatabaseIfNotExists option.
+ *
+ * The option is a: {@code Boolean} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbCreateDatabaseIfNotExist}.
+ */
+ public String azureCosmosDbCreateDatabaseIfNotExist() {
+ return "CamelAzureCosmosDbCreateDatabaseIfNotExist";
+ }
+ /**
+ * Whether to create the container when it does not exist. Replaces the
+ * createContainerIfNotExists option.
+ *
+ * The option is a: {@code Boolean} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbCreateContainerIfNotExist}.
+ */
+ public String azureCosmosDbCreateContainerIfNotExist() {
+ return "CamelAzureCosmosDbCreateContainerIfNotExist";
+ }
+ /**
+ * The indexing policy of a container that the producer creates.
+ * Replaces the indexingPolicy option.
+ *
+ * The option is a: {@code com.azure.cosmos.models.IndexingPolicy}
type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbIndexingPolicy}.
+ */
+ public String azureCosmosDbIndexingPolicy() {
+ return "CamelAzureCosmosDbIndexingPolicy";
+ }
+ /**
+ * The throughput of a database or container that the producer creates,
+ * and the new throughput of replaceDatabaseThroughput and
+ * replaceContainerThroughput. Replaces the throughputProperties
option.
+ *
+ * The option is a: {@code
com.azure.cosmos.models.ThroughputProperties}
+ * type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbThroughputProperties}.
+ */
+ public String azureCosmosDbThroughputProperties() {
+ return "CamelAzureCosmosDbThroughputProperties";
+ }
+ /**
+ * The request options of deleteDatabase.
+ *
+ * The option is a: {@code
+ * com.azure.cosmos.models.CosmosDatabaseRequestOptions} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbDatabaseRequestOptions}.
+ */
+ public String azureCosmosDbDatabaseRequestOptions() {
+ return "CamelAzureCosmosDbDatabaseRequestOptions";
+ }
+ /**
+ * The partition key path of a container that the producer creates.
+ * Replaces the containerPartitionKeyPath option.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbContainerPartitionKeyPath}.
+ */
+ public String azureCosmosDbContainerPartitionKeyPath() {
+ return "CamelAzureCosmosDbContainerPartitionKeyPath";
+ }
+ /**
+ * The request options of deleteContainer.
+ *
+ * The option is a: {@code
+ * com.azure.cosmos.models.CosmosContainerRequestOptions} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbContainerRequestOptions}.
+ */
+ public String azureCosmosDbContainerRequestOptions() {
+ return "CamelAzureCosmosDbContainerRequestOptions";
+ }
+ /**
+ * The value of the partition key of the item for createItem,
+ * upsertItem, replaceItem, deleteItem and readItem, and of the items
+ * that readAllItems reads. Replaces the itemPartitionKey option. A
+ * com.azure.cosmos.models.PartitionKey is used as it is, for example
+ * for a partition key value that is a number or a boolean; any other
+ * value is converted to a String.
+ *
+ * The option is a: {@code String or
+ * com.azure.cosmos.models.PartitionKey} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
AzureCosmosDbItemPartitionKey}.
+ */
+ public String azureCosmosDbItemPartitionKey() {
+ return "CamelAzureCosmosDbItemPartitionKey";
+ }
+ /**
+ * The request options of createItem, upsertItem, replaceItem,
+ * deleteItem and readItem.
+ *
+ * The option is a: {@code
+ * com.azure.cosmos.models.CosmosItemRequestOptions} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbItemRequestOptions}.
+ */
+ public String azureCosmosDbItemRequestOptions() {
+ return "CamelAzureCosmosDbItemRequestOptions";
+ }
+ /**
+ * The id of the item for readItem, replaceItem and deleteItem.
Replaces
+ * the itemId option.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbItemId}.
+ */
+ public String azureCosmosDbItemId() {
+ return "CamelAzureCosmosDbItemId";
+ }
+ /**
+ * The resource id of the database or container, set by the operations
+ * on a database or a container that get its properties back, such as
+ * createDatabase and createContainer.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbResourceId}.
+ */
+ public String azureCosmosDbResourceId() {
+ return "CamelAzureCosmosDbResourceId";
+ }
+ /**
+ * The entity tag of the database, container, throughput or item that
+ * the operation returns.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbEtag}.
+ */
+ public String azureCosmosDbEtag() {
+ return "CamelAzureCosmosDbEtag";
+ }
+ /**
+ * The time of the last update of the database, container or throughput
+ * that the operation returns.
+ *
+ * The option is a: {@code java.time.Instant} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbTimestamp}.
+ */
+ public String azureCosmosDbTimestamp() {
+ return "CamelAzureCosmosDbTimestamp";
+ }
+ /**
+ * The headers of the response of Cosmos DB, for all operations except
+ * listDatabases, queryDatabases, listContainers, queryContainers,
+ * readAllItems and queryItems.
+ *
+ * The option is a: {@code Map<String, String>} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbResponseHeaders}.
+ */
+ public String azureCosmosDbResponseHeaders() {
+ return "CamelAzureCosmosDbResponseHeaders";
+ }
+ /**
+ * The HTTP status code of the response of Cosmos DB, for all
operations
+ * except listDatabases, queryDatabases, listContainers,
+ * queryContainers, readAllItems and queryItems.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AzureCosmosDbStatusCode}.
+ */
+ public String azureCosmosDbStatusCode() {
+ return "CamelAzureCosmosDbStatusCode";
+ }
+ /**
+ * The default time to live of the items of the container, in seconds,
+ * set by the operations on a container that get its properties back,
+ * such as createContainer.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbDefaultTimeToLiveInSeconds}.
+ */
+ public String azureCosmosDbDefaultTimeToLiveInSeconds() {
+ return "CamelAzureCosmosDbDefaultTimeToLiveInSeconds";
+ }
+ /**
+ * The manual throughput, in request units per second, after
+ * replaceDatabaseThroughput or replaceContainerThroughput.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
AzureCosmosDbManualThroughput}.
+ */
+ public String azureCosmosDbManualThroughput() {
+ return "CamelAzureCosmosDbManualThroughput";
+ }
+ /**
+ * The maximum autoscale throughput, in request units per second, after
+ * replaceDatabaseThroughput or replaceContainerThroughput.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AzureCosmosDbAutoscaleMaxThroughput}.
+ */
+ public String azureCosmosDbAutoscaleMaxThroughput() {
+ return "CamelAzureCosmosDbAutoscaleMaxThroughput";
+ }
+ }
static CosmosDbEndpointBuilder endpointBuilder(String componentName,
String path) {
class CosmosDbEndpointBuilderImpl extends AbstractEndpointBuilder
implements CosmosDbEndpointBuilder, AdvancedCosmosDbEndpointBuilder {
public CosmosDbEndpointBuilderImpl(String path) {