Share via


PartitionReceiver Constructors

Definition

Overloads

PartitionReceiver()

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver(String, String, EventPosition, EventHubConnection, PartitionReceiverOptions)

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver(String, String, EventPosition, String, PartitionReceiverOptions)

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver(String, String, EventPosition, String, String, PartitionReceiverOptions)

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver(String, String, EventPosition, String, String, AzureNamedKeyCredential, PartitionReceiverOptions)

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver(String, String, EventPosition, String, String, AzureSasCredential, PartitionReceiverOptions)

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver(String, String, EventPosition, String, String, TokenCredential, PartitionReceiverOptions)

Initializes a new instance of the PartitionReceiver class.

PartitionReceiver()

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

protected PartitionReceiver ();
Protected Sub New ()

Applies to

PartitionReceiver(String, String, EventPosition, EventHubConnection, PartitionReceiverOptions)

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

public PartitionReceiver (string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, Azure.Messaging.EventHubs.EventHubConnection connection, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = default);
new Azure.Messaging.EventHubs.Primitives.PartitionReceiver : string * string * Azure.Messaging.EventHubs.Consumer.EventPosition * Azure.Messaging.EventHubs.EventHubConnection * Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions -> Azure.Messaging.EventHubs.Primitives.PartitionReceiver
Public Sub New (consumerGroup As String, partitionId As String, eventPosition As EventPosition, connection As EventHubConnection, Optional options As PartitionReceiverOptions = Nothing)

Parameters

consumerGroup
String

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

partitionId
String

The identifier of the Event Hub partition from which events will be received.

eventPosition
EventPosition

The position within the partition where the client should begin reading events.

connection
EventHubConnection

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

options
PartitionReceiverOptions

A set of options to apply when configuring the client.

Applies to

PartitionReceiver(String, String, EventPosition, String, PartitionReceiverOptions)

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

public PartitionReceiver (string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string connectionString, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = default);
new Azure.Messaging.EventHubs.Primitives.PartitionReceiver : string * string * Azure.Messaging.EventHubs.Consumer.EventPosition * string * Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions -> Azure.Messaging.EventHubs.Primitives.PartitionReceiver
Public Sub New (consumerGroup As String, partitionId As String, eventPosition As EventPosition, connectionString As String, Optional options As PartitionReceiverOptions = Nothing)

Parameters

consumerGroup
String

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

partitionId
String

The identifier of the Event Hub partition from which events will be received.

eventPosition
EventPosition

The position within the partition where the client should begin reading events.

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.

options
PartitionReceiverOptions

A set of options to apply when configuring the client.

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

PartitionReceiver(String, String, EventPosition, String, String, PartitionReceiverOptions)

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

public PartitionReceiver (string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string connectionString, string eventHubName, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = default);
new Azure.Messaging.EventHubs.Primitives.PartitionReceiver : string * string * Azure.Messaging.EventHubs.Consumer.EventPosition * string * string * Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions -> Azure.Messaging.EventHubs.Primitives.PartitionReceiver
Public Sub New (consumerGroup As String, partitionId As String, eventPosition As EventPosition, connectionString As String, eventHubName As String, Optional options As PartitionReceiverOptions = Nothing)

Parameters

consumerGroup
String

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

partitionId
String

The identifier of the Event Hub partition from which events will be received.

eventPosition
EventPosition

The position within the partition where the client should begin reading events.

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 client with.

options
PartitionReceiverOptions

A set of options to apply when configuring the client.

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

PartitionReceiver(String, String, EventPosition, String, String, AzureNamedKeyCredential, PartitionReceiverOptions)

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

public PartitionReceiver (string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string fullyQualifiedNamespace, string eventHubName, Azure.AzureNamedKeyCredential credential, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = default);
new Azure.Messaging.EventHubs.Primitives.PartitionReceiver : string * string * Azure.Messaging.EventHubs.Consumer.EventPosition * string * string * Azure.AzureNamedKeyCredential * Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions -> Azure.Messaging.EventHubs.Primitives.PartitionReceiver
Public Sub New (consumerGroup As String, partitionId As String, eventPosition As EventPosition, fullyQualifiedNamespace As String, eventHubName As String, credential As AzureNamedKeyCredential, Optional options As PartitionReceiverOptions = Nothing)

Parameters

consumerGroup
String

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

partitionId
String

The identifier of the Event Hub partition from which events will be received.

eventPosition
EventPosition

The position within the partition where the client should begin reading events.

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 client with.

credential
AzureNamedKeyCredential

The shared 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.

options
PartitionReceiverOptions

A set of options to apply when configuring the client.

Applies to

PartitionReceiver(String, String, EventPosition, String, String, AzureSasCredential, PartitionReceiverOptions)

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

public PartitionReceiver (string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string fullyQualifiedNamespace, string eventHubName, Azure.AzureSasCredential credential, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = default);
new Azure.Messaging.EventHubs.Primitives.PartitionReceiver : string * string * Azure.Messaging.EventHubs.Consumer.EventPosition * string * string * Azure.AzureSasCredential * Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions -> Azure.Messaging.EventHubs.Primitives.PartitionReceiver
Public Sub New (consumerGroup As String, partitionId As String, eventPosition As EventPosition, fullyQualifiedNamespace As String, eventHubName As String, credential As AzureSasCredential, Optional options As PartitionReceiverOptions = Nothing)

Parameters

consumerGroup
String

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

partitionId
String

The identifier of the Event Hub partition from which events will be received.

eventPosition
EventPosition

The position within the partition where the client should begin reading events.

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 client with.

credential
AzureSasCredential

The shared 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.

options
PartitionReceiverOptions

A set of options to apply when configuring the client.

Applies to

PartitionReceiver(String, String, EventPosition, String, String, TokenCredential, PartitionReceiverOptions)

Source:
PartitionReceiver.cs
Source:
PartitionReceiver.cs

Initializes a new instance of the PartitionReceiver class.

public PartitionReceiver (string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = default);
new Azure.Messaging.EventHubs.Primitives.PartitionReceiver : string * string * Azure.Messaging.EventHubs.Consumer.EventPosition * string * string * Azure.Core.TokenCredential * Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions -> Azure.Messaging.EventHubs.Primitives.PartitionReceiver
Public Sub New (consumerGroup As String, partitionId As String, eventPosition As EventPosition, fullyQualifiedNamespace As String, eventHubName As String, credential As TokenCredential, Optional options As PartitionReceiverOptions = Nothing)

Parameters

consumerGroup
String

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

partitionId
String

The identifier of the Event Hub partition from which events will be received.

eventPosition
EventPosition

The position within the partition where the client should begin reading events.

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 client 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.

options
PartitionReceiverOptions

A set of options to apply when configuring the client.

Applies to