Azure Event Hubs 绑定规范

关于 Azure Event Hubs 组件绑定的详细文档

配置

要开始 Azure 事件中心绑定,需要创建一个类型为 bindings.azure.eventhubs 的组件。 See this guide on how to create and apply a binding configuration.

参考此实例来创建一个事件中心。

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
  namespace: <NAMESPACE>
spec:
  type: bindings.azure.eventhubs
  version: v1
  metadata:
  - name: connectionString      # Azure EventHubs connection string
    value: "Endpoint=sb://****"
  - name: consumerGroup         # EventHubs consumer group
    value: "group1"
  - name: storageAccountName    # Azure Storage Account Name
    value: "accountName"
  - name: storageAccountKey     # Azure Storage Account Key
    value: "accountKey"
  - name: storageContainerName  # Azure Storage Container Name
    value: "containerName"
  - name: partitionID           # (Optional) PartitionID to send and receive events
    value: 0

元数据字段规范

字段必填绑定支持详情Example
connectionStringY输出EventHubs 连接字符串。 请注意,这是 EventHubs 本身,而不是 EventHubs 名称空间。 确保使用子 EventHub 共享访问策略连接字符串"Endpoint=sb://****"
consumerGroupY输出The name of an EventHubs Consumer Group to listen on"group1"
storageAccountNameY输出The name of the account of the Azure Storage account to persist checkpoints data on"accountName"
storageAccountKeyY输出The account key for the Azure Storage account to persist checkpoints data on"accountKey"
storageContainerNameY输出The name of the container in the Azure Storage account to persist checkpoints data on"contianerName"
partitionIDN输出ID of the partition to send and receive events0

绑定支持

字段名为 ttlInSeconds

  • create

相关链接