Interface CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder

All Superinterfaces:
org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
All Known Subinterfaces:
CosmosDbEndpointBuilderFactory.CosmosDbEndpointBuilder
Enclosing interface:
CosmosDbEndpointBuilderFactory

public static interface CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder extends org.apache.camel.builder.EndpointConsumerBuilder
Builder for endpoint consumers for the Azure CosmosDB component.
  • Method Details

    • advanced

    • clientTelemetryEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder clientTelemetryEnabled(boolean clientTelemetryEnabled)
      Sets the flag to enable client telemetry which will periodically collect database operations aggregation statistics, system information like cpu/memory and send it to cosmos monitoring service, which will be helpful during debugging. DEFAULT value is false indicating this is an opt-in feature, by default no telemetry collection. The option is a: boolean type. Default: false Group: common
      Parameters:
      clientTelemetryEnabled - the value to set
      Returns:
      the dsl builder
    • clientTelemetryEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder clientTelemetryEnabled(String clientTelemetryEnabled)
      Sets the flag to enable client telemetry which will periodically collect database operations aggregation statistics, system information like cpu/memory and send it to cosmos monitoring service, which will be helpful during debugging. DEFAULT value is false indicating this is an opt-in feature, by default no telemetry collection. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      clientTelemetryEnabled - the value to set
      Returns:
      the dsl builder
    • connectionSharingAcrossClientsEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder connectionSharingAcrossClientsEnabled(boolean connectionSharingAcrossClientsEnabled)
      Enables connections sharing across multiple Cosmos Clients. The default is false. When you have multiple instances of Cosmos Client in the same JVM interacting with multiple Cosmos accounts, enabling this allows connection sharing in Direct mode if possible between instances of Cosmos Client. Please note, when setting this option, the connection configuration (e.g., socket timeout config, idle timeout config) of the first instantiated client will be used for all other client instances. The option is a: boolean type. Default: false Group: common
      Parameters:
      connectionSharingAcrossClientsEnabled - the value to set
      Returns:
      the dsl builder
    • connectionSharingAcrossClientsEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder connectionSharingAcrossClientsEnabled(String connectionSharingAcrossClientsEnabled)
      Enables connections sharing across multiple Cosmos Clients. The default is false. When you have multiple instances of Cosmos Client in the same JVM interacting with multiple Cosmos accounts, enabling this allows connection sharing in Direct mode if possible between instances of Cosmos Client. Please note, when setting this option, the connection configuration (e.g., socket timeout config, idle timeout config) of the first instantiated client will be used for all other client instances. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      connectionSharingAcrossClientsEnabled - the value to set
      Returns:
      the dsl builder
    • consistencyLevel

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder consistencyLevel(com.azure.cosmos.ConsistencyLevel consistencyLevel)
      Sets the consistency levels supported for Azure Cosmos DB client operations in the Azure Cosmos DB service. The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency levels by order of strength are STRONG, BOUNDED_STALENESS, SESSION and EVENTUAL. Refer to consistency level documentation for additional details: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels. The option is a: com.azure.cosmos.ConsistencyLevel type. Default: SESSION Group: common
      Parameters:
      consistencyLevel - the value to set
      Returns:
      the dsl builder
    • consistencyLevel

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder consistencyLevel(String consistencyLevel)
      Sets the consistency levels supported for Azure Cosmos DB client operations in the Azure Cosmos DB service. The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency levels by order of strength are STRONG, BOUNDED_STALENESS, SESSION and EVENTUAL. Refer to consistency level documentation for additional details: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels. The option will be converted to a com.azure.cosmos.ConsistencyLevel type. Default: SESSION Group: common
      Parameters:
      consistencyLevel - the value to set
      Returns:
      the dsl builder
    • containerPartitionKeyPath

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder containerPartitionKeyPath(String containerPartitionKeyPath)
      Sets the container partition key path. The option is a: java.lang.String type. Group: common
      Parameters:
      containerPartitionKeyPath - the value to set
      Returns:
      the dsl builder
    • contentResponseOnWriteEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder contentResponseOnWriteEnabled(boolean contentResponseOnWriteEnabled)
      Sets the boolean to only return the headers and status code in Cosmos DB response in case of Create, Update and Delete operations on CosmosItem. In Consumer, it is enabled by default because of the ChangeFeed in the consumer that needs this flag to be enabled, and thus it shouldn't be overridden. In Producer, it is advised to disable it since it reduces the network overhead. The option is a: boolean type. Default: true Group: common
      Parameters:
      contentResponseOnWriteEnabled - the value to set
      Returns:
      the dsl builder
    • contentResponseOnWriteEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder contentResponseOnWriteEnabled(String contentResponseOnWriteEnabled)
      Sets the boolean to only return the headers and status code in Cosmos DB response in case of Create, Update and Delete operations on CosmosItem. In Consumer, it is enabled by default because of the ChangeFeed in the consumer that needs this flag to be enabled, and thus it shouldn't be overridden. In Producer, it is advised to disable it since it reduces the network overhead. The option will be converted to a boolean type. Default: true Group: common
      Parameters:
      contentResponseOnWriteEnabled - the value to set
      Returns:
      the dsl builder
    • cosmosAsyncClient

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder cosmosAsyncClient(com.azure.cosmos.CosmosAsyncClient cosmosAsyncClient)
      Inject an external CosmosAsyncClient into the component which provides a client-side logical representation of the Azure Cosmos DB service. This asynchronous client is used to configure and execute requests against the service. The option is a: com.azure.cosmos.CosmosAsyncClient type. Group: common
      Parameters:
      cosmosAsyncClient - the value to set
      Returns:
      the dsl builder
    • cosmosAsyncClient

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder cosmosAsyncClient(String cosmosAsyncClient)
      Inject an external CosmosAsyncClient into the component which provides a client-side logical representation of the Azure Cosmos DB service. This asynchronous client is used to configure and execute requests against the service. The option will be converted to a com.azure.cosmos.CosmosAsyncClient type. Group: common
      Parameters:
      cosmosAsyncClient - the value to set
      Returns:
      the dsl builder
    • createContainerIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createContainerIfNotExists(boolean createContainerIfNotExists)
      Sets if the component should create the Cosmos container automatically in case it doesn't exist in the Cosmos database. The option is a: boolean type. Default: false Group: common
      Parameters:
      createContainerIfNotExists - the value to set
      Returns:
      the dsl builder
    • createContainerIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createContainerIfNotExists(String createContainerIfNotExists)
      Sets if the component should create the Cosmos container automatically in case it doesn't exist in the Cosmos database. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      createContainerIfNotExists - the value to set
      Returns:
      the dsl builder
    • createDatabaseIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createDatabaseIfNotExists(boolean createDatabaseIfNotExists)
      Sets if the component should create the Cosmos database automatically in case it doesn't exist in the Cosmos account. The option is a: boolean type. Default: false Group: common
      Parameters:
      createDatabaseIfNotExists - the value to set
      Returns:
      the dsl builder
    • createDatabaseIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createDatabaseIfNotExists(String createDatabaseIfNotExists)
      Sets if the component should create the Cosmos database automatically in case it doesn't exist in the Cosmos account. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      createDatabaseIfNotExists - the value to set
      Returns:
      the dsl builder
    • databaseEndpoint

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder databaseEndpoint(String databaseEndpoint)
      Sets the Azure Cosmos database endpoint the component will connect to. The option is a: java.lang.String type. Required: true Group: common
      Parameters:
      databaseEndpoint - the value to set
      Returns:
      the dsl builder
    • multipleWriteRegionsEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder multipleWriteRegionsEnabled(boolean multipleWriteRegionsEnabled)
      Sets the flag to enable writes on any regions for geo-replicated database accounts in the Azure Cosmos DB service. When the value of this property is true, the SDK will direct write operations to available writable regions of geo-replicated database account. Writable regions are ordered by PreferredRegions property. Setting the property value to true has no effect until EnableMultipleWriteRegions in DatabaseAccount is also set to true. DEFAULT value is true indicating that writes are directed to available writable regions of geo-replicated database account. The option is a: boolean type. Default: true Group: common
      Parameters:
      multipleWriteRegionsEnabled - the value to set
      Returns:
      the dsl builder
    • multipleWriteRegionsEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder multipleWriteRegionsEnabled(String multipleWriteRegionsEnabled)
      Sets the flag to enable writes on any regions for geo-replicated database accounts in the Azure Cosmos DB service. When the value of this property is true, the SDK will direct write operations to available writable regions of geo-replicated database account. Writable regions are ordered by PreferredRegions property. Setting the property value to true has no effect until EnableMultipleWriteRegions in DatabaseAccount is also set to true. DEFAULT value is true indicating that writes are directed to available writable regions of geo-replicated database account. The option will be converted to a boolean type. Default: true Group: common
      Parameters:
      multipleWriteRegionsEnabled - the value to set
      Returns:
      the dsl builder
    • preferredRegions

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder preferredRegions(String preferredRegions)
      Sets the comma separated preferred regions for geo-replicated database accounts. For example, East US as the preferred region. When EnableEndpointDiscovery is true and PreferredRegions is non-empty, the SDK will prefer to use the regions in the container in the order they are specified to perform operations. The option is a: java.lang.String type. Group: common
      Parameters:
      preferredRegions - the value to set
      Returns:
      the dsl builder
    • readRequestsFallbackEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder readRequestsFallbackEnabled(boolean readRequestsFallbackEnabled)
      Sets whether to allow for reads to go to multiple regions configured on an account of Azure Cosmos DB service. DEFAULT value is true. If this property is not set, the default is true for all Consistency Levels other than Bounded Staleness, The default is false for Bounded Staleness. 1. endpointDiscoveryEnabled is true 2. the Azure Cosmos DB account has more than one region. The option is a: boolean type. Default: true Group: common
      Parameters:
      readRequestsFallbackEnabled - the value to set
      Returns:
      the dsl builder
    • readRequestsFallbackEnabled

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder readRequestsFallbackEnabled(String readRequestsFallbackEnabled)
      Sets whether to allow for reads to go to multiple regions configured on an account of Azure Cosmos DB service. DEFAULT value is true. If this property is not set, the default is true for all Consistency Levels other than Bounded Staleness, The default is false for Bounded Staleness. 1. endpointDiscoveryEnabled is true 2. the Azure Cosmos DB account has more than one region. The option will be converted to a boolean type. Default: true Group: common
      Parameters:
      readRequestsFallbackEnabled - the value to set
      Returns:
      the dsl builder
    • throughputProperties

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder throughputProperties(com.azure.cosmos.models.ThroughputProperties throughputProperties)
      Sets throughput of the resources in the Azure Cosmos DB service. The option is a: com.azure.cosmos.models.ThroughputProperties type. Group: common
      Parameters:
      throughputProperties - the value to set
      Returns:
      the dsl builder
    • throughputProperties

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder throughputProperties(String throughputProperties)
      Sets throughput of the resources in the Azure Cosmos DB service. The option will be converted to a com.azure.cosmos.models.ThroughputProperties type. Group: common
      Parameters:
      throughputProperties - the value to set
      Returns:
      the dsl builder
    • changeFeedProcessorOptions

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder changeFeedProcessorOptions(com.azure.cosmos.models.ChangeFeedProcessorOptions changeFeedProcessorOptions)
      Sets the ChangeFeedProcessorOptions to be used. Unless specifically set the default values that will be used are: maximum items per page or FeedResponse: 100 lease renew interval: 17 seconds lease acquire interval: 13 seconds lease expiration interval: 60 seconds feed poll delay: 5 seconds maximum scale count: unlimited. The option is a: com.azure.cosmos.models.ChangeFeedProcessorOptions type. Group: consumer
      Parameters:
      changeFeedProcessorOptions - the value to set
      Returns:
      the dsl builder
    • changeFeedProcessorOptions

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder changeFeedProcessorOptions(String changeFeedProcessorOptions)
      Sets the ChangeFeedProcessorOptions to be used. Unless specifically set the default values that will be used are: maximum items per page or FeedResponse: 100 lease renew interval: 17 seconds lease acquire interval: 13 seconds lease expiration interval: 60 seconds feed poll delay: 5 seconds maximum scale count: unlimited. The option will be converted to a com.azure.cosmos.models.ChangeFeedProcessorOptions type. Group: consumer
      Parameters:
      changeFeedProcessorOptions - the value to set
      Returns:
      the dsl builder
    • createLeaseContainerIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createLeaseContainerIfNotExists(boolean createLeaseContainerIfNotExists)
      Sets if the component should create Cosmos lease container for the consumer automatically in case it doesn't exist in Cosmos database. The option is a: boolean type. Default: false Group: consumer
      Parameters:
      createLeaseContainerIfNotExists - the value to set
      Returns:
      the dsl builder
    • createLeaseContainerIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createLeaseContainerIfNotExists(String createLeaseContainerIfNotExists)
      Sets if the component should create Cosmos lease container for the consumer automatically in case it doesn't exist in Cosmos database. The option will be converted to a boolean type. Default: false Group: consumer
      Parameters:
      createLeaseContainerIfNotExists - the value to set
      Returns:
      the dsl builder
    • createLeaseDatabaseIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createLeaseDatabaseIfNotExists(boolean createLeaseDatabaseIfNotExists)
      Sets if the component should create the Cosmos lease database for the consumer automatically in case it doesn't exist in the Cosmos account. The option is a: boolean type. Default: false Group: consumer
      Parameters:
      createLeaseDatabaseIfNotExists - the value to set
      Returns:
      the dsl builder
    • createLeaseDatabaseIfNotExists

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder createLeaseDatabaseIfNotExists(String createLeaseDatabaseIfNotExists)
      Sets if the component should create the Cosmos lease database for the consumer automatically in case it doesn't exist in the Cosmos account. The option will be converted to a boolean type. Default: false Group: consumer
      Parameters:
      createLeaseDatabaseIfNotExists - the value to set
      Returns:
      the dsl builder
    • hostName

      Sets the hostname. The host: a host is an application instance that uses the change feed processor to listen for changes. Multiple instances with the same lease configuration can run in parallel, but each instance should have a different instance name. If not specified, this will be a generated random hostname. The option is a: java.lang.String type. Group: consumer
      Parameters:
      hostName - the value to set
      Returns:
      the dsl builder
    • leaseContainerName

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder leaseContainerName(String leaseContainerName)
      Sets the lease container which acts as a state storage and coordinates processing the change feed across multiple workers. The lease container can be stored in the same account as the monitored container or in a separate account. It will be auto-created if createLeaseContainerIfNotExists is set to true. The option is a: java.lang.String type. Default: camel-lease Group: consumer
      Parameters:
      leaseContainerName - the value to set
      Returns:
      the dsl builder
    • leaseDatabaseName

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder leaseDatabaseName(String leaseDatabaseName)
      Sets the lease database where the leaseContainerName will be stored. If it is not specified, this component will store the lease container in the same database that is specified in databaseName. It will be auto-created if createLeaseDatabaseIfNotExists is set to true. The option is a: java.lang.String type. Group: consumer
      Parameters:
      leaseDatabaseName - the value to set
      Returns:
      the dsl builder
    • accountKey

      Sets either a master or readonly key used to perform authentication for accessing resource. The option is a: java.lang.String type. Group: security
      Parameters:
      accountKey - the value to set
      Returns:
      the dsl builder
    • credentialType

      default CosmosDbEndpointBuilderFactory.CosmosDbEndpointConsumerBuilder credentialType(org.apache.camel.component.azure.cosmosdb.CredentialType credentialType)
      Determines the credential strategy to adopt. The option is a: org.apache.camel.component.azure.cosmosdb.CredentialType type. Default: SHARED_ACCOUNT_KEY Group: security
      Parameters:
      credentialType - the value to set
      Returns:
      the dsl builder
    • credentialType

      Determines the credential strategy to adopt. The option will be converted to a org.apache.camel.component.azure.cosmosdb.CredentialType type. Default: SHARED_ACCOUNT_KEY Group: security
      Parameters:
      credentialType - the value to set
      Returns:
      the dsl builder