Table of Contents

Class ChangeFeedProcessorState

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

Change Feed processor state for a particular range of partition keys.

public sealed class ChangeFeedProcessorState
Inheritance
ChangeFeedProcessorState
Inherited Members
Extension Methods

Constructors

ChangeFeedProcessorState(string, long, string)

Initializes a new instance of the ChangeFeedProcessorState class.

public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName)

Parameters

leaseToken string

The lease token that identifies this lease.

estimatedLag long

The amount of documents remaining to be processed

instanceName string

The instance currently owning the lease.

Properties

EstimatedLag

Gets an approximation of the difference between the last processed transaction in the feed container and the latest transaction recorded.

public long EstimatedLag { get; }

Property Value

long

Remarks

The estimation over the Change Feed identifies volumes of transactions. If operations in the container are performed through stored procedures, transactional batch or bulk, a group of operations may share the same transaction scope and represented by a single transaction. In those cases, the estimation might not exactly represent number of items, but it is still valid to understand if the pending volume is increasing, decreasing, or on a steady state.

InstanceName

Gets the name of the instance currently owning the lease.

public string InstanceName { get; }

Property Value

string

Remarks

Leases can be in a released state and not being owned by any instance on a particular moment in time, in which case, this value is null.

LeaseToken

Gets the lease token for which the state is calculated

public string LeaseToken { get; }

Property Value

string