Class DistributedPubSubSettings
TBD
Inherited Members
Namespace: Akka.Cluster.Tools.PublishSubscribe
Assembly: Akka.Cluster.Tools.dll
Syntax
public sealed record DistributedPubSubSettings : INoSerializationVerificationNeeded, IEquatable<DistributedPubSubSettings>
Constructors
| Edit this page View SourceDistributedPubSubSettings(string, RoutingLogic, TimeSpan, TimeSpan, int, bool)
Creates a new instance of the DistributedPubSubSettings.
Declaration
[Obsolete("Use .ctor that supports WaitForSubscribers instead. Since 1.4.42")]
public DistributedPubSubSettings(string role, RoutingLogic routingLogic, TimeSpan gossipInterval, TimeSpan removedTimeToLive, int maxDeltaElements, bool sendToDeadLettersWhenNoSubscribers)
Parameters
Type | Name | Description |
---|---|---|
string | role | The role that will host DistributedPubSubMediator instances. |
RoutingLogic | routingLogic | Optional. The routing logic used for distributing messages for topic groups. |
TimeSpan | gossipInterval | The gossip interval for propagating topic/subscriber data to other mediators. |
TimeSpan | removedTimeToLive | The amount of time it takes to prune a deactivated subscriber from the network. |
int | maxDeltaElements | The maximum number of delta elements that can be propagated in a single gossip tick. |
bool | sendToDeadLettersWhenNoSubscribers | When a message is published to a topic with no subscribers send it to the dead letters. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if a user tries to use a ConsistentHashingRoutingLogic with routingLogic. |
DistributedPubSubSettings(string, RoutingLogic, TimeSpan, TimeSpan, int, bool, int, TimeSpan)
Creates a new instance of the DistributedPubSubSettings.
Declaration
public DistributedPubSubSettings(string role, RoutingLogic routingLogic, TimeSpan gossipInterval, TimeSpan removedTimeToLive, int maxDeltaElements, bool sendToDeadLettersWhenNoSubscribers, int maxBufferedMessagePerTopic, TimeSpan bufferedMessageTimeoutCheckInterval)
Parameters
Type | Name | Description |
---|---|---|
string | role | The role that will host DistributedPubSubMediator instances. |
RoutingLogic | routingLogic | Optional. The routing logic used for distributing messages for topic groups. |
TimeSpan | gossipInterval | The gossip interval for propagating topic/subscriber data to other mediators. |
TimeSpan | removedTimeToLive | The amount of time it takes to prune a deactivated subscriber from the network. |
int | maxDeltaElements | The maximum number of delta elements that can be propagated in a single gossip tick. |
bool | sendToDeadLettersWhenNoSubscribers | When a message is published to a topic with no subscribers send it to the dead letters. |
int | maxBufferedMessagePerTopic | Maximum message buffer size for each topic |
TimeSpan | bufferedMessageTimeoutCheckInterval | Buffered message timeout condition check interval |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if a user tries to use a ConsistentHashingRoutingLogic with routingLogic. |
Properties
| Edit this page View SourceBufferedMessageTimeoutCheckInterval
Determine the interval on which all buffered PublishWithAck message will be checked for timeout condition
Declaration
public TimeSpan BufferedMessageTimeoutCheckInterval { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
GossipInterval
How often the DistributedPubSubMediator should send out gossip information
Declaration
public TimeSpan GossipInterval { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
MaxBufferedMessagePerTopic
The maximum PublishWithAck message buffer size for each topic
Declaration
public int MaxBufferedMessagePerTopic { get; }
Property Value
Type | Description |
---|---|
int |
MaxDeltaElements
Maximum number of elements to transfer in one message when synchronizing the registries. Next chunk will be transferred in next round of gossip.
Declaration
public int MaxDeltaElements { get; }
Property Value
Type | Description |
---|---|
int |
RemovedTimeToLive
Removed entries are pruned after this duration.
Declaration
public TimeSpan RemovedTimeToLive { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Role
The mediator starts on members tagged with this role. Uses all if undefined.
Declaration
public string Role { get; }
Property Value
Type | Description |
---|---|
string |
RoutingLogic
The routing logic to use for DistributedPubSubMediator.
Declaration
public RoutingLogic RoutingLogic { get; }
Property Value
Type | Description |
---|---|
RoutingLogic |
SendToDeadLettersWhenNoSubscribers
When a message is published to a topic with no subscribers send it to the dead letters.
Declaration
public bool SendToDeadLettersWhenNoSubscribers { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceCreate(ActorSystem)
Creates cluster publish/subscribe settings from the default configuration akka.cluster.pub-sub
.
Declaration
public static DistributedPubSubSettings Create(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | TBD |
Returns
Type | Description |
---|---|
DistributedPubSubSettings | TBD |
Exceptions
Type | Condition |
---|---|
ArgumentException | TBD |
Create(Config)
Creates cluster publish subscribe settings from provided configuration with the same layout as akka.cluster.pub-sub
.
Declaration
public static DistributedPubSubSettings Create(Config config)
Parameters
Type | Name | Description |
---|---|---|
Config | config | TBD |
Returns
Type | Description |
---|---|
DistributedPubSubSettings | TBD |
Exceptions
Type | Condition |
---|---|
ArgumentException | TBD |
WithBufferedMessageTimeoutCheckInterval(TimeSpan)
Declaration
public DistributedPubSubSettings WithBufferedMessageTimeoutCheckInterval(TimeSpan bufferedMessageTimeoutCheckInterval)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | bufferedMessageTimeoutCheckInterval |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithGossipInterval(TimeSpan)
Declaration
public DistributedPubSubSettings WithGossipInterval(TimeSpan gossipInterval)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gossipInterval |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithMaxBufferedMessagePerTopic(int)
Declaration
public DistributedPubSubSettings WithMaxBufferedMessagePerTopic(int maxBufferedMessagePerTopic)
Parameters
Type | Name | Description |
---|---|---|
int | maxBufferedMessagePerTopic |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithMaxDeltaElements(int)
Declaration
public DistributedPubSubSettings WithMaxDeltaElements(int maxDeltaElements)
Parameters
Type | Name | Description |
---|---|---|
int | maxDeltaElements |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithRemovedTimeToLive(TimeSpan)
Declaration
public DistributedPubSubSettings WithRemovedTimeToLive(TimeSpan removedTtl)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | removedTtl |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithRole(string)
Declaration
public DistributedPubSubSettings WithRole(string role)
Parameters
Type | Name | Description |
---|---|---|
string | role |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithRoutingLogic(RoutingLogic)
Declaration
public DistributedPubSubSettings WithRoutingLogic(RoutingLogic routingLogic)
Parameters
Type | Name | Description |
---|---|---|
RoutingLogic | routingLogic |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |
WithSendToDeadLettersWhenNoSubscribers(bool)
Declaration
public DistributedPubSubSettings WithSendToDeadLettersWhenNoSubscribers(bool sendToDeadLetterWhenNoSubscribers)
Parameters
Type | Name | Description |
---|---|---|
bool | sendToDeadLetterWhenNoSubscribers |
Returns
Type | Description |
---|---|
DistributedPubSubSettings |