Partition​Context Class

Definition

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

public class PartitionContext
Inheritance
PartitionContext

Constructors

Partition​Context()

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

Properties

Consumer​Group​Name

Gets or sets the name of the consumer group.

Event​Hub​Path

Gets or sets the path of the event hub.

Lease

Gets or sets the messaging lease.

Runtime​Info

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

Methods

Checkpoint​Async()

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

Checkpoint​Async(​Event​Data)

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

Extension Methods

IsDefined(Object)

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

IsNull(Object)

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

IsPrimitive(Object)

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