Azure Event Hubs Click here for latest

Scale applications based on Azure Event Hubs.

Availability: v1.0+ Maintainer: Microsoft


You are currently viewing v"2.1" of the documentation and it is not the latest. For the most recent documentation, kindly click here.


As of now, the Event Hub scaler only supports reading checkpoints from Blob Storage, as well as scaling only Event Hub applications written in C#, Java, Python or created with Azure Functions.

Trigger Specification

This specification describes the azure-eventhub trigger for Azure Event Hubs.

- type: azure-eventhub
    consumerGroup: $Default
    unprocessedEventThreshold: '64'
    blobContainer: 'name_of_container'

Parameter list:

  • connectionFromEnv - Name of the environment variable your deployment uses to get the connection string appended with EntityPath=<event_hub_name>.
  • storageConnectionFromEnv - Name of the environment variable that provides connection string for Azure Storage Account to store checkpoint. As of now the Event Hub scaler only reads from Azure Blob Storage.
  • consumerGroup - Consumer group of event hub consumer. (Default: $default, Optional)
  • unprocessedEventThreshold - Average target value to trigger scaling actions. (Default: 64, Optional)
  • blobContainer - Container name to store checkpoint. This is needed when a using an Event Hub application written in dotnet or java, and not an Azure function.

💡 The Azure Storage connection string is not compatible with connection string created from a Shared Access Signature.

Authentication Parameters

You can authenticate by using pod identity or connection string authentication.

Connection String Authentication:

  • connection - Connection string for the Azure Event Hubs Namespace.

    The following formats are supported.

    • With SharedAccessKey - Endpoint=sb://<sb>;SharedAccessKeyName=<key name>;SharedAccessKey=<key value>;EntityPath=<hub-name>.
  • storageConnection - Connection string for the Azure Storage Account used to store checkpoint information.

💡 When providing connection, EntityPath is optional. If it is not provided, then eventHubName must be used to provide the name of the Azure Event Hub instance to use inside the namespace.

Pod identity based authentication:

Azure AD Pod Identity or Azure AD Workload Identity providers can be used.

kind: TriggerAuthentication
  name: nameOfTriggerAuth
  namespace: default
    provider: Azure

When you do so, the Event Hub scaler will depend on the existence of two configurations you have to provide: eventHubNamespace and eventHubName.


kind: ScaledObject
  name: azure-eventhub-scaledobject
  namespace: default
    name: azureeventhub-function
  - type: azure-eventhub
      # Required
      storageConnectionFromEnv: AzureWebJobsStorage
      # Required if not using Pod Identity
      connectionFromEnv: EventHub
      # Required if using Pod Identity
      eventHubNamespace: AzureEventHubNameSpace
      eventHubName: NameOfTheEventHub
# Optional
      consumerGroup: $Default # default: $Default
      unprocessedEventThreshold: '64' # default 64 events.
      blobContainer: ehcontainer