Class ContinuousQueryOptions
Continuous query options.
public sealed record ContinuousQueryOptions : IEquatable<ContinuousQueryOptions>
- Inheritance
-
ContinuousQueryOptions
- Implements
- Inherited Members
Constructors
ContinuousQueryOptions()
Initializes a new instance of the ContinuousQueryOptions class.
public ContinuousQueryOptions()
ContinuousQueryOptions(IContinuousQueryWatermark?, ICollection<string>?, ICollection<TableRowEventType>?, int, TimeSpan, bool)
Continuous query options.
public ContinuousQueryOptions(IContinuousQueryWatermark? Watermark, ICollection<string>? ColumnNames, ICollection<TableRowEventType>? EventTypes, int PageSize, TimeSpan PollInterval, bool EnableEmptyBatches = false)
Parameters
WatermarkIContinuousQueryWatermarkStarting watermark. When null, the query will start from the current time. Watermark can be obtained from physical time (FromInstant(Instant)) or from a previous event (GetWatermark()).
The default value is null, meaning the query will start from the current time.ColumnNamesICollection<string>Column names to include. When null, all columns are included.
By default, all columns are included.EventTypesICollection<TableRowEventType>Event types to include. When null, all event types are included.
By default, all event types are included.PageSizeintPer-partition page size.
Continuous Query polls every partition in a loop. This parameter controls the number of entries that will be requested from a single partition in one network call. Therefore, the maximum number of entries that the query may hold in memory at any given time ispageSize * partitions. The default value is DefaultPageSize.PollIntervalTimeSpanPoll interval.
The default value is DefaultPollInterval.EnableEmptyBatchesboolWhen true, empty batches are returned when there are no new events to track watermark updates.
The default value is false, meaning that empty batches are not returned.
Fields
Default
Default continuous query options.
public static readonly ContinuousQueryOptions Default
Field Value
DefaultLongPollingWaitTime
Default long polling wait time (10 seconds).
public static readonly TimeSpan DefaultLongPollingWaitTime
Field Value
DefaultPageSize
Default page size (1000).
public const int DefaultPageSize = 1000
Field Value
DefaultPollInterval
Default poll interval (1 second).
public static readonly TimeSpan DefaultPollInterval
Field Value
Properties
ColumnNames
Column names to include. When null, all columns are included.
By default, all columns are included.public ICollection<string>? ColumnNames { get; init; }
Property Value
EnableEmptyBatches
When true, empty batches are returned when there are no new events to track watermark updates.
The default value is false, meaning that empty batches are not returned.public bool EnableEmptyBatches { get; init; }
Property Value
EventTypes
Event types to include. When null, all event types are included.
By default, all event types are included.public ICollection<TableRowEventType>? EventTypes { get; init; }
Property Value
LongPollingWaitTime
Gets the long polling wait time. A zero or negative value disables long polling.
Long polling is an optimization that reduces latency and network round trips. When the client polls a partition and no events are immediately available, instead of returning an empty response, the server holds the request open for up to LongPollingWaitTime, waiting for new events to arrive. If events arrive during this wait period, they are returned immediately. If the timeout expires with no events, an empty response is returned. Works together with PollInterval. After receiving a response (with or without data), the client waits for PollInterval. For minimal latency, reduce PollInterval and increase LongPollingWaitTime. For better throughput and batching, increase PollInterval and PageSize. The default value is DefaultLongPollingWaitTime.public TimeSpan LongPollingWaitTime { get; init; }
Property Value
PageSize
Per-partition page size.
Continuous Query polls every partition in a loop. This parameter controls the number of entries that will be requested from a single partition in one network call. Therefore, the maximum number of entries that the query may hold in memory at any given time ispageSize * partitions.
The default value is DefaultPageSize.
public int PageSize { get; init; }
Property Value
PollInterval
Poll interval.
The default value is DefaultPollInterval.public TimeSpan PollInterval { get; init; }
Property Value
Watermark
Starting watermark. When null, the query will start from the current time. Watermark can be obtained from physical time (FromInstant(Instant)) or from a previous event (GetWatermark()).
The default value is null, meaning the query will start from the current time.public IContinuousQueryWatermark? Watermark { get; init; }