Search documentationEsc

ChangeFeedOptions

The options for monitoring the change feed.

Namespace: Microsoft.Azure.CosmosRepository.ChangeFeed
Kind: class

The options for monitoring the change feed.

public class ChangeFeedOptions

Example

Members

Propertys

ChangeFeedOptions.InstanceName

The instance name of the processor.

public string InstanceName { get; set; }

Returns — String

ChangeFeedOptions.PollInterval

The poll interval to query the change feed processor

public TimeSpan? PollInterval { get; set; }

Returns — TimeSpan}

ChangeFeedOptions.ProcessorName

The processor name provided to the change feed processor library.

public string ProcessorName { get; set; }

Returns — String

ChangeFeedOptions.StartTime

Sets the time (exclusive) to start looking for changes after.

public DateTime? StartTime { get; set; }

Returns — DateTime}

This is only used when: (1) Lease store is not initialized and is ignored if a lease exists and has continuation token. (2) StartContinuation is not specified. If this is specified, StartFromBeginning is ignored.

ChangeFeedOptions.LeaseAcquireInterval

The interval on which instances scan the lease store for expired or unowned leases to acquire. When null the change feed processor SDK default is used.

public TimeSpan? LeaseAcquireInterval { get; set; }

Returns — TimeSpan}

ChangeFeedOptions.LeaseExpirationInterval

The interval after which a lease is considered expired when it has not been renewed, allowing another instance to acquire it. When null the change feed processor SDK default is used.

public TimeSpan? LeaseExpirationInterval { get; set; }

Returns — TimeSpan}

Keep this comfortably larger than LeaseRenewInterval; if it is not, a live owner can lose its lease before renewing, causing changes to be processed more than once. A good rule of thumb is roughly three to four times the renew interval (for example a 30s renew with a 120s expiration), which mirrors the SDK defaults. The intervals are not validated against each other.

ChangeFeedOptions.LeaseRenewInterval

The interval on which the current owner renews (heartbeats) its leases. A larger value results in fewer lease writes. When null the change feed processor SDK default is used.

public TimeSpan? LeaseRenewInterval { get; set; }

Returns — TimeSpan}

If you raise this above the SDK default lease expiration, also raise LeaseExpirationInterval so leases do not expire before they are renewed.