Share via


EventHubClient.CreateReceiver Method

Definition

Create the EventHub receiver with given EventPosition. The receiver is created for a specific EventHub Partition from the specific consumer group.

public Microsoft.Azure.EventHubs.PartitionReceiver CreateReceiver (string consumerGroupName, string partitionId, Microsoft.Azure.EventHubs.EventPosition eventPosition, Microsoft.Azure.EventHubs.ReceiverOptions receiverOptions = default);
member this.CreateReceiver : string * string * Microsoft.Azure.EventHubs.EventPosition * Microsoft.Azure.EventHubs.ReceiverOptions -> Microsoft.Azure.EventHubs.PartitionReceiver
Public Function CreateReceiver (consumerGroupName As String, partitionId As String, eventPosition As EventPosition, Optional receiverOptions As ReceiverOptions = Nothing) As PartitionReceiver

Parameters

consumerGroupName
String

the consumer group name that this receiver should be grouped under.

partitionId
String

the partition Id that the receiver belongs to. All data received will be from this partition only.

eventPosition
EventPosition

The starting EventPosition at which to start receiving messages.

receiverOptions
ReceiverOptions

Options for a event hub receiver.

Returns

The created PartitionReceiver

Applies to

See also