Share via


PartitionContext Class

Definition

Encapsulates information related to an Event Hubs partition used by IEventProcessor.

public class PartitionContext
type PartitionContext = class
Public Class PartitionContext
Inheritance
PartitionContext

Constructors

PartitionContext(EventProcessorHost, String, String, String, CancellationToken)

Properties

CancellationToken

Gets triggered when the partition gets closed.

ConsumerGroupName

Gets the name of the consumer group.

EventHubPath

Gets the path of the event hub.

Lease

Gets the most recent checkpointed lease.

Owner

Gets the host owner for the partition.

PartitionId

Gets the partition ID for the context.

RuntimeInformation

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

Methods

CheckpointAsync()

Writes the current offset and sequenceNumber to the checkpoint store via the checkpoint manager.

CheckpointAsync(Checkpoint)

Writes the current offset and sequenceNumber to the checkpoint store via the checkpoint manager.

CheckpointAsync(EventData)

Stores the offset and sequenceNumber from the provided received EventData instance, then writes those values to the checkpoint store via the checkpoint manager.

ToString()

Provides the parition context in the following format:"PartitionContext({EventHubPath}/{ConsumerGroupName}/{PartitionId}/{SequenceNumber})"

Applies to