Table of Contents

Class PubsubPaceOptions

Namespace
Virtufin.Api.Services
Assembly
Virtufin.Api.dll

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

Lease TimeSpan

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.

Stall TimeSpan

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.

HighWater TimeSpan

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.

MaxWait TimeSpan

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.

Recheck TimeSpan

How 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

PubsubPaceOptions

DefaultHighWaterSeconds

public const double DefaultHighWaterSeconds = 30

Field Value

double

DefaultLeaseSeconds

public const double DefaultLeaseSeconds = 15

Field Value

double

DefaultMaxWaitSeconds

public const double DefaultMaxWaitSeconds = 60

Field Value

double

DefaultRecheckSeconds

public const double DefaultRecheckSeconds = 1

Field Value

double

DefaultStallSeconds

public const double DefaultStallSeconds = 60

Field Value

double

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

TimeSpan

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

TimeSpan

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

TimeSpan

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

TimeSpan

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

TimeSpan

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)

Parameters

lease string
stall string
highWater string
maxWait string
recheck string

Returns

PubsubPaceOptions