다음을 통해 공유


PartitionReceiver Class

Definition

This is a logical representation of receiving from a EventHub partition.

A PartitionReceiver is tied to a ConsumerGroup + Partition combination. If you are creating an epoch based PartitionReceiver (i.e. PartitionReceiver.Epoch != 0) you cannot have more than one active receiver per ConsumerGroup + Partition combo. You can have multiple receivers per ConsumerGroup + Partition combination with non-epoch receivers.

public abstract class PartitionReceiver : Microsoft.Azure.EventHubs.ClientEntity
type PartitionReceiver = class
    inherit ClientEntity
Public MustInherit Class PartitionReceiver
Inherits ClientEntity
Inheritance
PartitionReceiver

Constructors

PartitionReceiver(EventHubClient, String, String, EventPosition, Nullable<Int64>, ReceiverOptions)

Fields

DefaultConsumerGroupName

The default consumer group name: $Default.

Properties

ClientId

Gets the client ID.

(Inherited from ClientEntity)
ConsumerGroupName

The Consumer Group Name

Epoch

Get the epoch value that this receiver is currently using for partition ownership.

A value of null means this receiver is not an epoch-based receiver.

EventHubClient

The EventHubClient this PartitionReceiver was created from.

EventPosition
Identifier

Gets the identifier of a receiver which was set during the creation of the receiver.

IsClosed

Returns a boolean representing whether client object is closed or not.

(Inherited from ClientEntity)
PartitionId

Get the EventHub partition identifier.

PrefetchCount

Get Prefetch Count configured on the Receiver.

ReceiverRuntimeMetricEnabled

Gets a value indicating whether the runtime metric of a receiver is enabled.

RegisteredPlugins

Gets a list of currently registered plugins for this Client.

(Inherited from ClientEntity)
RetryPolicy

Gets the RetryPolicy for the ClientEntity.

(Inherited from ClientEntity)
RuntimeInfo

Gets the approximate receiver runtime information for a logical partition of an Event Hub. To enable the setting, refer to ReceiverOptions and EnableReceiverRuntimeMetric

Methods

Close()

Closes the ClientEntity.

(Inherited from ClientEntity)
CloseAsync()

Closes and releases resources associated with PartitionReceiver.

OnCloseAsync()
OnReceiveAsync(Int32, TimeSpan)
OnRetryPolicyUpdate()

Derived entity to override for retry policy updates.

(Inherited from ClientEntity)
OnSetReceiveHandler(IPartitionReceiveHandler, Boolean)
ReceiveAsync(Int32, TimeSpan)

Receive a batch of EventData's from an EventHub partition by allowing wait time on each individual call.

ReceiveAsync(Int32)

Receive a batch of EventData's from an EventHub partition

RegisterPlugin(EventHubsPlugin)

Registers a EventHubsPlugin to be used with this client.

(Inherited from ClientEntity)
SetReceiveHandler(IPartitionReceiveHandler, Boolean)

Sets the IPartitionReceiveHandler to process events.

ThrowIfClosed()

Throws an exception if client object is already closed.

(Inherited from ClientEntity)
UnregisterPlugin(String)

Unregisters a EventHubsPlugin.

(Inherited from ClientEntity)

Applies to

See also