你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

EventProcessorClient 构造函数

定义

重载

EventProcessorClient()

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String, String)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String, String, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String, String, AzureNamedKeyCredential, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String, String, AzureSasCredential, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient(BlobContainerClient, String, String, String, TokenCredential, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

EventProcessorClient()

初始化 EventProcessorClient 类的新实例。

protected EventProcessorClient ();
Protected Sub New ()

适用于

EventProcessorClient(BlobContainerClient, String, String)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, connectionString As String)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

connectionString
String

用于连接到事件中心命名空间的连接字符串;此连接字符串中应包含事件中心名称和共享密钥属性。

注解

checkpointStore 关联的容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅对容器中的 blob 具有读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 blob。

如果连接字符串是从事件中心命名空间复制的,则它可能不会包含所需事件中心的名称,这是必需的。 在这种情况下,可以通过添加“;手动添加名称EntityPath=[[ EVENT HUB NAME ]]“ 到连接字符串的末尾。 例如,“;EntityPath=telemetry-hub”。

如果已直接在事件中心本身上定义共享访问策略,则从该事件中心复制连接字符串将导致包含该名称的连接字符串。

适用于

EventProcessorClient(BlobContainerClient, String, String, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string * Azure.Messaging.EventHubs.EventProcessorClientOptions -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, connectionString As String, clientOptions As EventProcessorClientOptions)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

connectionString
String

用于连接到事件中心命名空间的连接字符串;此连接字符串中应包含事件中心名称和共享密钥属性。

clientOptions
EventProcessorClientOptions

要用于此处理器的选项集。

注解

checkpointStore 关联的容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅对容器中的 blob 具有读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 blob。

如果连接字符串是从事件中心命名空间复制的,则它可能不会包含所需事件中心的名称,这是必需的。 在这种情况下,可以通过添加“;手动添加名称EntityPath=[[ EVENT HUB NAME ]]“ 到连接字符串的末尾。 例如,“;EntityPath=telemetry-hub”。

如果已直接在事件中心本身上定义共享访问策略,则从该事件中心复制连接字符串将导致包含该名称的连接字符串。

适用于

EventProcessorClient(BlobContainerClient, String, String, String)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString, string eventHubName);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string * string -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, connectionString As String, eventHubName As String)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

connectionString
String

用于连接到事件中心命名空间的连接字符串;共享密钥属性应包含在此连接字符串中,但不包含事件中心名称。

eventHubName
String

要与之关联的特定事件中心的名称。

注解

checkpointStore 关联的容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅对容器中的 blob 具有读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 blob。

如果连接字符串是从事件中心本身复制的,它将包含所需事件中心的名称,并且可以直接使用,而无需传递 eventHubName。 事件中心的名称应仅传递一次,可以是连接字符串的一部分,也可以单独传递。

适用于

EventProcessorClient(BlobContainerClient, String, String, String, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString, string eventHubName, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string * string * Azure.Messaging.EventHubs.EventProcessorClientOptions -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, connectionString As String, eventHubName As String, clientOptions As EventProcessorClientOptions)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

connectionString
String

用于连接到事件中心命名空间的连接字符串;共享密钥属性应包含在此连接字符串中,但不包含事件中心名称。

eventHubName
String

要与之关联的特定事件中心的名称。

clientOptions
EventProcessorClientOptions

要用于此处理器的选项集。

注解

checkpointStore 关联的容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅对容器中的 blob 具有读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 blob。

如果连接字符串是从事件中心本身复制的,它将包含所需事件中心的名称,并且可以直接使用,而无需传递 eventHubName。 事件中心的名称应仅传递一次,可以是连接字符串的一部分,也可以单独传递。

适用于

EventProcessorClient(BlobContainerClient, String, String, String, AzureNamedKeyCredential, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.AzureNamedKeyCredential credential, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string * string * Azure.AzureNamedKeyCredential * Azure.Messaging.EventHubs.EventProcessorClientOptions -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, fullyQualifiedNamespace As String, eventHubName As String, credential As AzureNamedKeyCredential, Optional clientOptions As EventProcessorClientOptions = Nothing)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

fullyQualifiedNamespace
String

要连接到的完全限定的事件中心命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

eventHubName
String

要与之关联的特定事件中心的名称。

credential
AzureNamedKeyCredential

用于授权的共享访问密钥凭据。 访问控制可能由事件中心命名空间或请求的事件中心指定,具体取决于 Azure 配置。

clientOptions
EventProcessorClientOptions

要用于此处理器的选项集。

注解

checkpointStore 关联的容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅对容器中的 blob 具有读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 blob。

适用于

EventProcessorClient(BlobContainerClient, String, String, String, AzureSasCredential, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.AzureSasCredential credential, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string * string * Azure.AzureSasCredential * Azure.Messaging.EventHubs.EventProcessorClientOptions -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, fullyQualifiedNamespace As String, eventHubName As String, credential As AzureSasCredential, Optional clientOptions As EventProcessorClientOptions = Nothing)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

fullyQualifiedNamespace
String

要连接到的完全限定的事件中心命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

eventHubName
String

要与之关联的特定事件中心的名称。

credential
AzureSasCredential

用于授权的共享访问签名凭据。 访问控制可能由事件中心命名空间或请求的事件中心指定,具体取决于 Azure 配置。

clientOptions
EventProcessorClientOptions

要用于此处理器的选项集。

注解

checkpointStore 关联的容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅对容器中的 blob 具有读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 blob。

适用于

EventProcessorClient(BlobContainerClient, String, String, String, TokenCredential, EventProcessorClientOptions)

初始化 EventProcessorClient 类的新实例。

public EventProcessorClient (Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.EventProcessorClient : Azure.Storage.Blobs.BlobContainerClient * string * string * string * Azure.Core.TokenCredential * Azure.Messaging.EventHubs.EventProcessorClientOptions -> Azure.Messaging.EventHubs.EventProcessorClient
Public Sub New (checkpointStore As BlobContainerClient, consumerGroup As String, fullyQualifiedNamespace As String, eventHubName As String, credential As TokenCredential, Optional clientOptions As EventProcessorClientOptions = Nothing)

参数

checkpointStore
BlobContainerClient

负责将检查点和处理器状态保存到持久存储的客户端。 共享此存储的处理器实例将尝试协调和共享工作。 关联的容器应存在。

consumerGroup
String

与此处理器关联的使用者组的名称。 处理器将断言对此组的分区的独占读取访问权限。

fullyQualifiedNamespace
String

要连接到的完全限定的事件中心命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

eventHubName
String

要与处理器关联的特定事件中心的名称。

credential
TokenCredential

用于授权的 Azure 标识凭据。 访问控制可能由事件中心命名空间或请求的事件中心指定,具体取决于 Azure 配置。

clientOptions
EventProcessorClientOptions

要用于此处理器的选项集。

注解

与 关联的 checkpointStore 容器应存在; EventProcessorClient 不假定能够管理存储帐户,并且仅使用容器中 Blob 的读/写权限即可安全运行。 建议此容器对于处理器使用的事件中心和使用者组是唯一的,并且不要包含其他 Blob。

适用于