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()

This is mainly created for unit testing IEventProcessor logic so various mocking frameworks can be used to pass in a mock for PartitionContext.

Properties

ConsumerGroupName

Gets or sets the name of the consumer group.

EventHubPath

Gets or sets the path of the event hub.

Lease

Gets or sets the messaging lease.

RuntimeInfo

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

Methods

CheckpointAsync()

Checkpoints progress of an Event Hubs message stream. Make sure to call this method once all the messages in a batch are processed.

CheckpointAsync(EventData)

Checkpoints progress of an Event Hubs message stream with the specified offset.

Applies to