Table of Contents

Class PubsubSubscriptionOptions

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

How long a topic's Dapr subscription stays open after its last subscriber left (configuration PubsubSubscriptionLingerSeconds, default DefaultLingerSeconds, 0 closes at once). A subscriber that joins meanwhile reuses it, so a quick resubscribe never closes and reopens a Dapr subscription: a closed one leaves daprd's reader behind to take the topic's next message (common#28). Messages published while nobody is subscribed are acked and dropped, as with no subscription at all (no catch-up).

public sealed record PubsubSubscriptionOptions : IEquatable<PubsubSubscriptionOptions>
Inheritance
PubsubSubscriptionOptions
Implements
Inherited Members

Constructors

PubsubSubscriptionOptions(TimeSpan)

How long a topic's Dapr subscription stays open after its last subscriber left (configuration PubsubSubscriptionLingerSeconds, default DefaultLingerSeconds, 0 closes at once). A subscriber that joins meanwhile reuses it, so a quick resubscribe never closes and reopens a Dapr subscription: a closed one leaves daprd's reader behind to take the topic's next message (common#28). Messages published while nobody is subscribed are acked and dropped, as with no subscription at all (no catch-up).

public PubsubSubscriptionOptions(TimeSpan Linger)

Parameters

Linger TimeSpan

Fields

DefaultLingerSeconds

public const int DefaultLingerSeconds = 10

Field Value

int

Immediate

No linger: the subscription closes with its last subscriber.

public static readonly PubsubSubscriptionOptions Immediate

Field Value

PubsubSubscriptionOptions

Properties

Linger

public TimeSpan Linger { get; init; }

Property Value

TimeSpan

Methods

From(string?)

From configuration; unset or unparsable keeps the default, a negative value is 0.

public static PubsubSubscriptionOptions From(string? lingerSeconds)

Parameters

lingerSeconds string

Returns

PubsubSubscriptionOptions