Share via


EventHubConsumerClient Constructors

Definition

Overloads

EventHubConsumerClient()

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, EventHubConnection, EventHubConsumerClientOptions)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String, EventHubConsumerClientOptions)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String, String)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String, String, EventHubConsumerClientOptions)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String, String, AzureNamedKeyCredential, EventHubConsumerClientOptions)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String, String, AzureSasCredential, EventHubConsumerClientOptions)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient(String, String, String, TokenCredential, EventHubConsumerClientOptions)

Initializes a new instance of the EventHubConsumerClient class.

EventHubConsumerClient()

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

protected EventHubConsumerClient ();
Protected Sub New ()

Applies to

EventHubConsumerClient(String, String)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string connectionString);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, connectionString As String)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

connectionString
String

The connection string to use for connecting to the Event Hubs namespace; it is expected that the Event Hub name and the shared key properties are contained in this connection string.

Remarks

If the connection string is copied from the Event Hubs namespace, it will likely not contain the name of the desired Event Hub, which is needed. In this case, the name can be added manually by adding ";EntityPath=[[ EVENT HUB NAME ]]" to the end of the connection string. For example, ";EntityPath=telemetry-hub".

If you have defined a shared access policy directly on the Event Hub itself, then copying the connection string from that Event Hub will result in a connection string that contains the name.

Applies to

EventHubConsumerClient(String, EventHubConnection, EventHubConsumerClientOptions)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, Azure.Messaging.EventHubs.EventHubConnection connection, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * Azure.Messaging.EventHubs.EventHubConnection * Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, connection As EventHubConnection, Optional clientOptions As EventHubConsumerClientOptions = Nothing)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

connection
EventHubConnection

The EventHubConnection connection to use for communication with the Event Hubs service.

clientOptions
EventHubConsumerClientOptions

A set of options to apply when configuring the consumer.

Applies to

EventHubConsumerClient(String, String, EventHubConsumerClientOptions)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string connectionString, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string * Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, connectionString As String, clientOptions As EventHubConsumerClientOptions)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

connectionString
String

The connection string to use for connecting to the Event Hubs namespace; it is expected that the Event Hub name and the shared key properties are contained in this connection string.

clientOptions
EventHubConsumerClientOptions

The set of options to use for this consumer.

Remarks

If the connection string is copied from the Event Hubs namespace, it will likely not contain the name of the desired Event Hub, which is needed. In this case, the name can be added manually by adding ";EntityPath=[[ EVENT HUB NAME ]]" to the end of the connection string. For example, ";EntityPath=telemetry-hub".

If you have defined a shared access policy directly on the Event Hub itself, then copying the connection string from that Event Hub will result in a connection string that contains the name.

Applies to

EventHubConsumerClient(String, String, String)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string connectionString, string eventHubName);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string * string -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, connectionString As String, eventHubName As String)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

connectionString
String

The connection string to use for connecting to the Event Hubs namespace; it is expected that the shared key properties are contained in this connection string, but not the Event Hub name.

eventHubName
String

The name of the specific Event Hub to associate the consumer with.

Remarks

If the connection string is copied from the Event Hub itself, it will contain the name of the desired Event Hub, and can be used directly without passing the eventHubName. The name of the Event Hub should be passed only once, either as part of the connection string or separately.

Applies to

EventHubConsumerClient(String, String, String, EventHubConsumerClientOptions)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string connectionString, string eventHubName, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string * string * Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, connectionString As String, eventHubName As String, clientOptions As EventHubConsumerClientOptions)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

connectionString
String

The connection string to use for connecting to the Event Hubs namespace; it is expected that the shared key properties are contained in this connection string, but not the Event Hub name.

eventHubName
String

The name of the specific Event Hub to associate the consumer with.

clientOptions
EventHubConsumerClientOptions

A set of options to apply when configuring the consumer.

Remarks

If the connection string is copied from the Event Hub itself, it will contain the name of the desired Event Hub, and can be used directly without passing the eventHubName. The name of the Event Hub should be passed only once, either as part of the connection string or separately.

Applies to

EventHubConsumerClient(String, String, String, AzureNamedKeyCredential, EventHubConsumerClientOptions)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.AzureNamedKeyCredential credential, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string * string * Azure.AzureNamedKeyCredential * Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, fullyQualifiedNamespace As String, eventHubName As String, credential As AzureNamedKeyCredential, Optional clientOptions As EventHubConsumerClientOptions = Nothing)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

fullyQualifiedNamespace
String

The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net.

eventHubName
String

The name of the specific Event Hub to associate the consumer with.

credential
AzureNamedKeyCredential

The shared access key credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration.

clientOptions
EventHubConsumerClientOptions

A set of options to apply when configuring the consumer.

Applies to

EventHubConsumerClient(String, String, String, AzureSasCredential, EventHubConsumerClientOptions)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.AzureSasCredential credential, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string * string * Azure.AzureSasCredential * Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, fullyQualifiedNamespace As String, eventHubName As String, credential As AzureSasCredential, Optional clientOptions As EventHubConsumerClientOptions = Nothing)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

fullyQualifiedNamespace
String

The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net.

eventHubName
String

The name of the specific Event Hub to associate the consumer with.

credential
AzureSasCredential

The shared access signature credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration.

clientOptions
EventHubConsumerClientOptions

A set of options to apply when configuring the consumer.

Applies to

EventHubConsumerClient(String, String, String, TokenCredential, EventHubConsumerClientOptions)

Source:
EventHubConsumerClient.cs
Source:
EventHubConsumerClient.cs

Initializes a new instance of the EventHubConsumerClient class.

public EventHubConsumerClient (string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions = default);
new Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient : string * string * string * Azure.Core.TokenCredential * Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions -> Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient
Public Sub New (consumerGroup As String, fullyQualifiedNamespace As String, eventHubName As String, credential As TokenCredential, Optional clientOptions As EventHubConsumerClientOptions = Nothing)

Parameters

consumerGroup
String

The name of the consumer group this consumer is associated with. Events are read in the context of this group.

fullyQualifiedNamespace
String

The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net.

eventHubName
String

The name of the specific Event Hub to associate the consumer with.

credential
TokenCredential

The Azure managed identity credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration.

clientOptions
EventHubConsumerClientOptions

A set of options to apply when configuring the consumer.

Applies to