Azure Storage Blob Service
Store, retrieve and manage blobs in Azure Blob Storage.
What’s inside
-
Azure Storage Blob Service component, URI syntax:
azure-storage-blob:accountName/containerName
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-azure-storage-blob-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 53 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.azure-storage-blob.access-key | The account key of the storage account, which authenticates the client together with accountName when credentialType is SHARED_ACCOUNT_KEY, for which it is required. Not used when the credentials option or the serviceClient option is set. | String | |
camel.component.azure-storage-blob.autowired-enabled | 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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.azure-storage-blob.azure-client-id | The client ID of the Microsoft Entra application that authenticates the client when credentialType is AZURE_IDENTITY, together with azureClientSecret and azureTenantId: set all three, or none to use the DefaultAzureCredential. | String | |
camel.component.azure-storage-blob.azure-client-secret | The client secret of the Microsoft Entra application that authenticates the client when credentialType is AZURE_IDENTITY, together with azureClientId and azureTenantId: set all three, or none to use the DefaultAzureCredential. | String | |
camel.component.azure-storage-blob.azure-tenant-id | The ID of the Microsoft Entra tenant of the application that authenticates the client when credentialType is AZURE_IDENTITY, together with azureClientId and azureClientSecret: set all three, or none to use the DefaultAzureCredential. | String | |
camel.component.azure-storage-blob.blob-name | The name of the blob. With it, the consumer reads only this blob, in each poll, and without it the consumer reads all the blobs of the container. The producer requires it for each operation on a blob, and the CamelAzureStorageBlobBlobName header replaces it. For copyBlob it is the name of both the source blob and the blob that the copy creates. | String | |
camel.component.azure-storage-blob.blob-offset | The position in bytes of the first byte to read from the blob, for the consumer and for getBlob, downloadBlobToFile and getPageBlobRanges. Must be 0 or more. | 0 | Long |
camel.component.azure-storage-blob.blob-sequence-number | The sequence number of the page blob that createPageBlob creates, a value of 0 or more that the application can use to track requests. The service uses 0 if not set. The CamelAzureStorageBlobSequenceNumber header replaces this option. | 0 | Long |
camel.component.azure-storage-blob.blob-type | The type of blob, which only changes the range that getBlob, downloadBlobToFile and getPageBlobRanges read: with pageblob, the CamelAzureStorageBlobPageBlobRange header, if set, gives the range instead of blobOffset and dataCount. The operation decides which type of blob it creates or writes. | blockblob | BlobType |
camel.component.azure-storage-blob.block-list-type | Which blocks of the block blob getBlobBlockList returns: COMMITTED, UNCOMMITTED or ALL. The CamelAzureStorageBlobBlockListType header replaces this option. | committed | BlockListType |
camel.component.azure-storage-blob.block-size | The size in bytes of each block that uploadBlockBlobChunked stages, from 1 byte to 4000 MiB, when the data is larger than maxSingleUploadSize. If not set, the Azure SDK uses 4 MiB, or 8 MiB for a file larger than 100 MiB. Not used when the CamelAzureStorageBlobParallelTransferOptions header is set. The CamelAzureStorageBlobBlockSize header replaces this option. | Long | |
camel.component.azure-storage-blob.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.azure-storage-blob.change-feed-context | A com.azure.core.util.Context that getChangeFeed passes through the HTTP pipeline of the Azure SDK. Only used when changeFeedStartTime or changeFeedEndTime is set. The CamelAzureStorageBlobContext header replaces this option. The option is a com.azure.core.util.Context type. | Context | |
camel.component.azure-storage-blob.change-feed-end-time | The time until which getChangeFeed returns the events of the change feed. The change feed is stored by the hour, so events of the next hour can also be returned, and events of this hour can be missing: round the end time up to the hour to get all of them. The CamelAzureStorageBlobChangeFeedEndTime header replaces this option. | OffsetDateTime | |
camel.component.azure-storage-blob.change-feed-start-time | The time from which getChangeFeed returns the events of the change feed. The change feed is stored by the hour, so events of the previous hour can also be returned, and events of this hour can be missing: round the start time down to the hour to get all of them. If neither this option nor changeFeedEndTime is set, getChangeFeed returns all events. The CamelAzureStorageBlobChangeFeedStartTime header replaces this option. | OffsetDateTime | |
camel.component.azure-storage-blob.close-stream-after-read | Whether the consumer and getBlob close the stream of the blob content: the InputStream body when the exchange completes, or the OutputStream body that getBlob writes into once the download is done. If false, the route must close it. | true | Boolean |
camel.component.azure-storage-blob.close-stream-after-write | Whether uploadBlockBlob, uploadBlockBlobChunked, commitAppendBlob and uploadPageBlob close the input stream of the message body after the upload. | true | Boolean |
camel.component.azure-storage-blob.commit-block-list-later | Whether stageBlockBlobList only stages the blocks, to be committed later with commitBlobBlockList. If false, stageBlockBlobList commits the staged blocks right away, so the blob then consists of these blocks only. The CamelAzureStorageBlobCommitBlobBlockListLater header replaces this option. | true | Boolean |
camel.component.azure-storage-blob.configuration | The configuration that each endpoint of this component starts from, before the options of the endpoint are applied. The option is a org.apache.camel.component.azure.storage.blob.BlobConfiguration type. | BlobConfiguration | |
camel.component.azure-storage-blob.create-append-blob | Whether commitAppendBlob first creates the append blob if it does not exist. The CamelAzureStorageBlobCreateAppendBlob header replaces this option. | true | Boolean |
camel.component.azure-storage-blob.create-page-blob | Whether uploadPageBlob first creates the page blob if it does not exist, as createPageBlob does. The CamelAzureStorageBlobCreatePageBlob header replaces this option. | true | Boolean |
camel.component.azure-storage-blob.credential-type | How the client authenticates when serviceClient is not set. SHARED_ACCOUNT_KEY uses accountName and accessKey, or the credentials option if it is set. SHARED_KEY_CREDENTIAL uses the credentials option. AZURE_SAS uses sasToken. AZURE_IDENTITY uses azureClientId, azureClientSecret and azureTenantId when all three are set, and otherwise the DefaultAzureCredential of azure-identity, which takes the identity from environment variables, a managed identity or a developer tool login. If not set, SHARED_KEY_CREDENTIAL is used when credentials is set, and otherwise AZURE_IDENTITY. | azure-identity | CredentialType |
camel.component.azure-storage-blob.credentials | To use a com.azure.storage.common.StorageSharedKeyCredential, which holds the account name and an account key of the storage account, when credentialType is SHARED_KEY_CREDENTIAL or SHARED_ACCOUNT_KEY. When it is set, its account name gives the address of the service, and the accountName and accessKey options are not used to authenticate. Not used when serviceClient is set. The option is a com.azure.storage.common.StorageSharedKeyCredential type. | StorageSharedKeyCredential | |
camel.component.azure-storage-blob.data-count | The number of bytes to read from the blob, from blobOffset, for the consumer and for getBlob, downloadBlobToFile and getPageBlobRanges. If not set, the range goes to the end of the blob. Must be 0 or more. | Long | |
camel.component.azure-storage-blob.delete-after-read | Delete each blob from the container once its exchange is complete. If the exchange fails, the blob is not deleted. If false and moveAfterRead is false, the consumer reads the same blobs again in each poll, so use the Idempotent Consumer EIP to filter out duplicates, for example on the CamelAzureStorageBlobBlobName header. | false | Boolean |
camel.component.azure-storage-blob.destination-blob-prefix | The text that moveAfterRead puts before the name of the blob, to name the moved blob. | String | |
camel.component.azure-storage-blob.destination-blob-suffix | The text that moveAfterRead appends to the name of the blob, to name the moved blob. | String | |
camel.component.azure-storage-blob.destination-container | The container that moveAfterRead moves the blobs to. Required when moveAfterRead is true. | String | |
camel.component.azure-storage-blob.download-link-expiration | How long, in milliseconds, the link that downloadLink generates stays valid. It is rounded down to whole seconds. If not set, the link is valid for 1 hour. The CamelAzureStorageBlobDownloadLinkExpiration header replaces this option. | Long | |
camel.component.azure-storage-blob.enabled | Whether to enable auto configuration of the azure-storage-blob component. This is enabled by default. | Boolean | |
camel.component.azure-storage-blob.file-dir | The directory to download blobs into. When it is set, the consumer downloads each blob into a file of this directory, named after the blob, and the body is that java.io.File instead of a stream. downloadBlobToFile requires it, and the CamelAzureStorageBlobFileDir header replaces it. A file that already exists is replaced. | String | |
camel.component.azure-storage-blob.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.azure-storage-blob.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.azure-storage-blob.lazy-start-producer | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.azure-storage-blob.lease-blob | Whether the producer acquires a lease on the blob before uploadBlockBlob, uploadBlockBlobChunked, commitAppendBlob, createPageBlob, uploadPageBlob, resizePageBlob and clearPageBlob, and releases it afterwards, so that no other client writes the blob in the meantime. No lease is acquired when the CamelAzureStorageBlobRequestCondition header holds a lease ID. The blob must exist. The CamelAzureStorageBlobLeaseBlob header replaces this option. | false | Boolean |
camel.component.azure-storage-blob.lease-duration-in-seconds | The duration in seconds of the lease that leaseBlob acquires: from 15 to 60, or -1 for a lease that does not expire. The CamelAzureStorageBlobLeaseDurationInSeconds header replaces this option. | 60 | Integer |
camel.component.azure-storage-blob.max-concurrency | The maximum number of requests that uploadBlockBlobChunked sends in parallel, 1 or more. If not set, the Azure SDK uses 8. Not used when the CamelAzureStorageBlobParallelTransferOptions header is set. The CamelAzureStorageBlobMaxConcurrency header replaces this option. | Integer | |
camel.component.azure-storage-blob.max-messages-per-poll | Maximum number of blobs to retrieve during one consumer polling cycle. A value of 0 or less means unlimited. | 0 | Integer |
camel.component.azure-storage-blob.max-results-per-page | The number of blobs per page, at most 5000, that the service returns when the consumer, listBlobs, listBlobVersions or findBlobsByTags list blobs. The producer still returns the blobs of all pages. If not set, the service returns up to 5000 per page, and the consumer asks for maxMessagesPerPoll blobs per page when maxMessagesPerPoll is set and regex is not. The CamelAzureStorageBlobMaxResultsPerPage header replaces this option for the producer. | Integer | |
camel.component.azure-storage-blob.max-retry-requests | How many more times the Azure SDK requests the rest of the blob, from where it stopped, when reading the content of a download fails: for getBlob with an OutputStream body, downloadBlobToFile and the consumer with fileDir. The default 0 turns these retries off, rather than the 5 retries of the SDK. Must be 0 or more. | 0 | Integer |
camel.component.azure-storage-blob.max-single-upload-size | The size in bytes, from 1 byte to 5000 MiB, up to which uploadBlockBlobChunked uploads the data in a single request. Larger data is uploaded in blocks of blockSize. If not set, the Azure SDK uses 256 MiB. Not used when the CamelAzureStorageBlobParallelTransferOptions header is set. The CamelAzureStorageBlobMaxSingleUploadSize header replaces this option. | Long | |
camel.component.azure-storage-blob.move-after-read | Move each blob to destinationContainer, in the same storage account, once its exchange is complete: the blob is copied and then deleted from the container, also when deleteAfterRead is false. If the exchange or the copy fails, the blob stays where it is and is read again. | false | Boolean |
camel.component.azure-storage-blob.operation | The operation that the producer performs. The CamelAzureStorageBlobOperation header replaces this option. If neither is set, the producer performs listBlobContainers. | listblobcontainers | BlobOperationsDefinition |
camel.component.azure-storage-blob.page-blob-size | The size in bytes of the page blob that createPageBlob creates, or that resizePageBlob sets: a multiple of 512, up to 8 TiB. When the CamelAzureStorageBlobPageBlobRange header is set, the length of that range is the size instead. The CamelAzureStorageBlobPageBlobSize header replaces this option. | 512 | Long |
camel.component.azure-storage-blob.prefix | List only the blobs whose names start with this prefix: the consumer, listBlobs and listBlobVersions. Not used when regex is set. With removePrefixOnMove, it is also the prefix that moveAfterRead removes. The CamelAzureStorageBlobPrefix header replaces this option for the producer. | String | |
camel.component.azure-storage-blob.regex | List only the blobs whose whole names match this Java regular expression: the consumer, listBlobs and listBlobVersions. The blobs are listed and then filtered on the client. When it is set, the prefix option is not used. The CamelAzureStorageBlobRegex header replaces this option for the producer. | String | |
camel.component.azure-storage-blob.remove-prefix-on-move | Remove the contents of the prefix configuration string from the new blob name before moving. For example, if prefix is set to 'notify/' and the destinationBlobPrefix is set to 'archive/', a blob with a name of 'notify/example.txt' will be moved to 'archive/example.txt', rather than the default behavior where the new name is 'archive/notify/example.txt'. Only applicable when moveAfterRead is true. | false | Boolean |
camel.component.azure-storage-blob.sas-token | The shared access signature (SAS) token that authenticates the client when credentialType is AZURE_SAS. Not used when serviceClient is set. | String | |
camel.component.azure-storage-blob.service-client | To use a custom com.azure.storage.blob.BlobServiceClient for the requests to the Blob Storage service. When this option is set or autowired, the client brings the address and the authentication, and the accountName, credentialType, accessKey, credentials, sasToken, azureClientId, azureClientSecret and azureTenantId options are not used to connect. The option is a com.azure.storage.blob.BlobServiceClient type. | BlobServiceClient | |
camel.component.azure-storage-blob.snapshot-id | The ID of the blob snapshot to read instead of the blob itself, for the consumer and for getBlob, downloadBlobToFile and downloadLink. The CamelAzureStorageBlobSnapshotId header replaces this option for the producer. | String | |
camel.component.azure-storage-blob.source-blob-access-key | The account key of the storage account of the source blob of copyBlob, which signs a short-lived read-only SAS for the source blob. | String | |
camel.component.azure-storage-blob.timeout | The time, for example PT30S or 30s, within which each request to the Blob Storage service must complete, or it fails with an exception. If not set, only the timeouts of the HTTP client apply. It does not apply to reading the blob as a stream (getBlob without an OutputStream body, and the consumer without fileDir), to copyBlob and to getChangeFeed, nor to the delete of deleteAfterRead. For moveAfterRead it is how long the consumer waits for the copy, 5 minutes if not set. The CamelAzureStorageBlobTimeout header replaces this option for the producer. | Duration | |
camel.component.azure-storage-blob.version-id | The ID of the blob version to read instead of the current version, for the consumer and for getBlob, downloadBlobToFile and downloadLink. The storage account must have blob versioning enabled. The CamelAzureStorageBlobVersionId header replaces this option for the producer. | String |