Class PubsubPaceOptions
Settings of paced publishing (openspec paced-publishing). The defaults fit the
chart's streamTTL of one minute; a deployment with another retention sets
them from it.
public sealed record PubsubPaceOptions : IEquatable<PubsubPaceOptions>
- Inheritance
-
PubsubPaceOptions
- Implements
- Inherited Members
Constructors
PubsubPaceOptions(TimeSpan, TimeSpan, TimeSpan, TimeSpan, TimeSpan)
Settings of paced publishing (openspec paced-publishing). The defaults fit the
chart's streamTTL of one minute; a deployment with another retention sets
them from it.
public PubsubPaceOptions(TimeSpan Lease, TimeSpan Stall, TimeSpan HighWater, TimeSpan MaxWait, TimeSpan Recheck)
Parameters
LeaseTimeSpanHow long a reported position counts (
PubsubProgressLeaseSeconds). A consumer that stopped reporting (deleted, its pod gone, moved and not yet reporting from the new pod) holds nobody back after this. Reporters repeat an unmoved position every half lease.StallTimeSpanHow long a consumer that is not idle may keep the same position before it stops counting (
PubsubProgressStallSeconds): one retention, after which it has lost events anyway, so one dead worker cannot hold a whole simulation.HighWaterTimeSpanThe lag at which a paced publish is held (
PubsubPaceHighWaterSeconds): half the retention, so a consumer held at the mark still has the other half to catch up in.MaxWaitTimeSpanHow long a paced publish is held at most before it ends with
RESOURCE_EXHAUSTED(PubsubPaceMaxWaitSeconds). Bounds a stall in a cycle of paced workers; the publisher decides what then.RecheckTimeSpanHow often a held publish looks again without a report (
PubsubPaceRecheckSeconds): leases running out and stalls happen without one. Reports wake it at once.
Fields
Default
public static readonly PubsubPaceOptions Default
Field Value
DefaultHighWaterSeconds
public const double DefaultHighWaterSeconds = 30
Field Value
DefaultLeaseSeconds
public const double DefaultLeaseSeconds = 15
Field Value
DefaultMaxWaitSeconds
public const double DefaultMaxWaitSeconds = 60
Field Value
DefaultRecheckSeconds
public const double DefaultRecheckSeconds = 1
Field Value
DefaultStallSeconds
public const double DefaultStallSeconds = 60
Field Value
Properties
HighWater
The lag at which a paced publish is held (PubsubPaceHighWaterSeconds):
half the retention, so a consumer held at the mark still has the other half to
catch up in.
public TimeSpan HighWater { get; init; }
Property Value
Lease
How long a reported position counts (PubsubProgressLeaseSeconds). A
consumer that stopped reporting (deleted, its pod gone, moved and not yet
reporting from the new pod) holds nobody back after this. Reporters repeat an
unmoved position every half lease.
public TimeSpan Lease { get; init; }
Property Value
MaxWait
How long a paced publish is held at most before it ends with
RESOURCE_EXHAUSTED (PubsubPaceMaxWaitSeconds). Bounds a stall in a
cycle of paced workers; the publisher decides what then.
public TimeSpan MaxWait { get; init; }
Property Value
Recheck
How often a held publish looks again without a report
(PubsubPaceRecheckSeconds): leases running out and stalls happen without
one. Reports wake it at once.
public TimeSpan Recheck { get; init; }
Property Value
Stall
How long a consumer that is not idle may keep the same position before it stops
counting (PubsubProgressStallSeconds): one retention, after which it has
lost events anyway, so one dead worker cannot hold a whole simulation.
public TimeSpan Stall { get; init; }
Property Value
Methods
From(string?, string?, string?, string?, string?)
From configuration; an unset, unparsable or non-positive value keeps the default.
public static PubsubPaceOptions From(string? lease, string? stall, string? highWater, string? maxWait, string? recheck)