Skip to main content

Azure Storage Queues

Type: bindings.azure.storagequeues

Status: stable

Reference: https://docs.dapr.io/reference/components-reference/supported-bindings/storagequeues/

Example

apiVersion: cra.diagrid.io/v1beta1
kind: Component
metadata:
name: <name>
spec:
type: bindings.azure.storagequeues
version: v1
metadata:
# The key to authenticate to the Storage Account.
- name: accountKey
value: "my-secret-key"
# The storage account name
- name: accountName
value: "mystorageaccount"
# Indicates the direction of the binding component.
- name: direction
value: "input,output"
# The name of the Azure Storage queue.
- name: queueName
value: "myqueue"
# Configuration to decode base64 file content before saving to Storage Queues (e.g. in case of saving a file with binary content). (Optional)
#- name: decodeBase64
# value: "false"
# When enabled, the data payload is base64-encoded before being sent to Azure Storage Queues. (Optional)
#- name: encodeBase64
# value: "false"
# Set the interval to poll Azure Storage Queues for new messages (Optional)
#- name: pollingInterval
# value: "10s"
# Optional custom endpoint URL. This is useful when using the Azurite emulator or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. (Optional)
#- name: queueEndpoint
# value: |
# http://127.0.0.1:10001
# https://accountName.queue.example.com
# Specifies a custom route for incoming events. (Optional)
#- name: route
# value: "/custom-path"
# Set the default message Time To Live (TTL). If empty, messages expire after 10 minutes. It's also possible to specify a per-message TTL by setting the `ttl` property in the invocation request's metadata. (Optional)
#- name: ttl
# value: "10m"
# Allows setting a custom queue visibility timeout to avoid immediate retrying of recently-failed messages. (Optional)
#- name: visibilityTimeout
# value: "30s"

Binding information

Input Binding: yes

Output Binding: yes

Output Binding operations:

  • create: Publish a new message in the queue.

Authentication profiles

Available authentication profiles:

  • Account Key

  • Azure AD: Client credentials

  • Azure AD: Client certificate

Account Key

Authenticate using a pre-shared "account key"

accountKey

Required - The key to authenticate to the Storage Account.

Example value: my-secret-key

Azure AD: Client credentials

Authenticate using Azure AD with client credentials, also known as "service principals".

azureClientId

Required - Client ID (application ID)

Example value: c7dd251f-811f-4ba2-a905-acd4d3f8f08b

azureClientSecret

Required - Client secret (application password)

Example value: Ecy3XG7zVZK3/vl/a2NSB+a1zXLa8RnMum/IgD0E

azureTenantId

Required - ID of the Azure AD tenant

Example value: cd4b2887-304c-47e1-b4d5-65447fdd542a

azureEnvironment

Optional name for the Azure environment if using a different Azure cloud

Default value: AzurePublicCloud

Example value: AzurePublicCloud

Allowed values:

  • AzurePublicCloud

  • AzureChinaCloud

  • AzureUSGovernmentCloud

Azure AD: Client certificate

Authenticate using Azure AD with a client certificate. "azureCertificate" is required.

azureClientId

Required - Client ID (application ID)

Example value: c7dd251f-811f-4ba2-a905-acd4d3f8f08b

azureTenantId

Required - ID of the Azure AD tenant

Example value: cd4b2887-304c-47e1-b4d5-65447fdd542a

azureCertificate

Certificate and private key (in either a PEM file containing both the certificate and key, or in PFX/PKCS#12 format)

Example value:

-----BEGIN PRIVATE KEY-----\n MIIEvgI... \n -----END PRIVATE KEY-----
\n -----BEGIN CERTIFICATE----- \n MIICoTC... \n -----END CERTIFICATE----- \n

azureCertificatePassword

Password for the certificate if encrypted.

Example value: password

azureEnvironment

Optional name for the Azure environment if using a different Azure cloud

Default value: AzurePublicCloud

Example value: AzurePublicCloud

Allowed values:

  • AzurePublicCloud

  • AzureChinaCloud

  • AzureUSGovernmentCloud

Metadata

accountName

Required - The storage account name

Example value: mystorageaccount

direction (string)

Required - Indicates the direction of the binding component.

Example value: input,output

Allowed values:

  • input

  • output

  • input,output

Documentation: https://docs.dapr.io/reference/api/bindings_api/#binding-direction-optional

queueName

Required - The name of the Azure Storage queue.

Example value: myqueue

decodeBase64 (bool)

Configuration to decode base64 file content before saving to Storage Queues (e.g. in case of saving a file with binary content). Used for output binding direction.

Default value: false

Example value: true, false

encodeBase64 (bool)

When enabled, the data payload is base64-encoded before being sent to Azure Storage Queues. Used for output binding direction.

Default value: false

Example value: true, false

pollingInterval (duration)

Set the interval to poll Azure Storage Queues for new messages

Default value: 10s

Example value: 30s

queueEndpoint

Optional custom endpoint URL. This is useful when using the Azurite emulator or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (http:// or https://), the IP or FQDN, and optional port.

Example value: http://127.0.0.1:10001 https://accountName.queue.example.com

route (string)

Specifies a custom route for incoming events.

Example value: /custom-path

Documentation: https://docs.dapr.io/developing-applications/building-blocks/bindings/howto-triggers/#specify-a-custom-route

ttl (duration)

Set the default message Time To Live (TTL). If empty, messages expire after 10 minutes. It's also possible to specify a per-message TTL by setting the ttl property in the invocation request's metadata. Used for output binding direction.

Default value: 10m

Example value: 30s

visibilityTimeout (duration)

Allows setting a custom queue visibility timeout to avoid immediate retrying of recently-failed messages. Used for input binding direction.

Default value: 30s

Example value: 1m