Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PartitionContext

Package version

Describes the Partition Context.

class

PartitionContext

Hierarchy

  • PartitionContext

Index

Constructors

constructor

Properties

lease

property

{Lease} lease The most recdent checkpointed lease with the partitionId.

partitionId

partitionId: string
property

{string} partitionId The eventhub partition id.

readonly

Accessors

consumerGroup

  • get consumerGroup(): string
  • property

    {string} consumerGroup The name of the consumer group.

    readonly

    Returns string

eventhubPath

  • get eventhubPath(): string
  • property

    {string} eventhubPath The path of the eventhub

    readonly

    Returns string

owner

  • get owner(): string
  • property

    {string} owner The host/owner of the partition.

    readonly

    Returns string

Methods

checkpoint

  • checkpoint(): Promise<void>
  • Writes the current offset and sequenceNumber to the checkpoint store via the checkpoint manager.

    The checkpoint data is structured as a JSON payload (example): { "partitionId":"0","owner":"ephtest","token":"48e209e3-55f0-41b8-a8dd-d9c09ff6c35a", "epoch":1,"offset":"","SequenceNumber":0 }.

    Returns Promise<void>

checkpointFromEventData

  • checkpointFromEventData(eventData: EventData): Promise<void>
  • Writes the current offset and sequenceNumber to the checkpoint store via the checkpoint manager.

    The checkpoint data is structured as a JSON payload (example): { "partitionId":"0","owner":"ephtest","token":"48e209e3-55f0-41b8-a8dd-d9c09ff6c35a", "epoch":1,"offset":"","SequenceNumber":0 }.

    Parameters

    • eventData: EventData

      The event data received from the EventHubReceiver.

    Returns Promise<void>

setOffsetAndSequenceNumber

  • setOffsetAndSequenceNumber(eventData: EventData): void
  • Sets the offset and sequence number of the partition context from the provided EventData.

    Parameters

    • eventData: EventData

      The event data received from the EventHubReceiver.

    Returns void

Generated using TypeDoc