Class DeDuplicatingReceiverSettings
The settings used to configure how the DeDuplicatingReceiveActor will process duplicates of messages and how it will configure its state.
Inheritance
Namespace:Akka.Persistence.Extras
Assembly:Akka.Persistence.Extras.dll
Syntax
public sealed class DeDuplicatingReceiverSettings : object
Constructors
DeDuplicatingReceiverSettings()
Creates a default DeDuplicatingReceiverSettings with the following values: ReceiverType = AnyOrder PruneInterval = 30m BufferSizePerSender = 1000
Declaration
public DeDuplicatingReceiverSettings()
DeDuplicatingReceiverSettings(ReceiveOrdering, TimeSpan, Int32, Int32, ITimeProvider)
Declaration
public DeDuplicatingReceiverSettings(ReceiveOrdering receiverType, TimeSpan pruneInterval, int bufferSizePerSender, int takeSnapshotEveryNMessages, ITimeProvider timeProvider = null)
Parameters
Type | Name | Description |
---|---|---|
ReceiveOrdering | receiverType | |
TimeSpan | pruneInterval | |
System.Int32 | bufferSizePerSender | |
System.Int32 | takeSnapshotEveryNMessages | |
ITimeProvider | timeProvider |
Fields
DefaultBufferSizePerSender
Declaration
public const int DefaultBufferSizePerSender = null
Field Value
Type | Description |
---|---|
System.Int32 |
DefaultPruneInterval
Declaration
public static readonly TimeSpan DefaultPruneInterval
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultSnapshotPerNMessages
Declaration
public const int DefaultSnapshotPerNMessages = null
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
BufferSizePerSender
For each individual sender who sends us a message, we will store up to
this many confirmationIds (
Declaration
public int BufferSizePerSender { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
For AnyOrder, we use a circular buffer thus we are never permitted to allocate more than this amount of memory for any individual sender. For StrictOrder we assume that all confirmationIds increase monotonically (because they are sent and confirmed in a strict order) and thus we only preserve the most recently confirmed message ID.
PruneInterval
The rate at which "quiet" senders will be purged from our internal receiver state. For instance, if this setting is set to 30 minutes, if we haven't received any messages (including duplicates) from a receiver for more than 30 minutes we will automatically purge our state for that receiver in order to conserve memory. We assume that senders are extremely unlikely to resend an unconfirmed message after anything longer than this interval. If that is not the case in your application you will want to increase this value to something larger.
Declaration
public TimeSpan PruneInterval { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
ReceiverType
The order in which this receiver expects to receive messages.
Declaration
public ReceiveOrdering ReceiverType { get; }
Property Value
Type | Description |
---|---|
ReceiveOrdering |
TakeSnapshotEveryNMessages
Take a new snapshot of our IReceiverState every N messages. This is designed to help cap recovery times for this actor in the event of a restart.
Declaration
public int TakeSnapshotEveryNMessages { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TimeProvider
INTERNAL API. Used to configure the IReceiverState time provider for testing purposes.
Declaration
public ITimeProvider TimeProvider { get; }
Property Value
Type | Description |
---|---|
ITimeProvider |
Remarks
Defaults to