Search Results for

    Show / Hide Table of Contents

    Class AtLeastOnceDeliverySemantic

    TBD

    Inheritance
    object
    AtLeastOnceDeliverySemantic
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Persistence
    Assembly: Akka.Persistence.dll
    Syntax
    public class AtLeastOnceDeliverySemantic

    Constructors

    | Edit this page View Source

    AtLeastOnceDeliverySemantic(IActorContext, AtLeastOnceDeliverySettings)

    Initializes a new instance of the AtLeastOnceDeliverySemantic class.

    Declaration
    public AtLeastOnceDeliverySemantic(IActorContext context, PersistenceSettings.AtLeastOnceDeliverySettings settings)
    Parameters
    Type Name Description
    IActorContext context

    TBD

    PersistenceSettings.AtLeastOnceDeliverySettings settings

    TBD

    Properties

    | Edit this page View Source

    MaxUnconfirmedMessages

    Maximum number of unconfirmed messages, that this actor is allowed to hold in the memory. if this number is exceeded, Deliver(ActorPath, Func<long, object>, bool) will not accept more messages and it will throw MaxUnconfirmedMessagesExceededException.

    The default value can be configure with the 'akka.persistence.at-least-once-delivery.max-unconfirmed-messages' configuration key.

    Declaration
    public int MaxUnconfirmedMessages { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    RedeliverInterval

    Interval between redelivery attempts.

    The default value can be configure with the 'akka.persistence.at-least-once-delivery.redeliver-interval' configuration key.

    Declaration
    public TimeSpan RedeliverInterval { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    RedeliveryBurstLimit

    Maximum number of unconfirmed messages that will be sent at each redelivery burst (burst frequency is half of the redelivery interval). If there's a lot of unconfirmed messages (e.g. if the destination is not available for a long time), this helps prevent an overwhelming amount of messages to be sent at once.

    The default value can be configure with the 'akka.persistence.at-least-once-delivery.redelivery-burst-limit' configuration key.

    Declaration
    public int RedeliveryBurstLimit { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    UnconfirmedCount

    Number of messages, that have not been confirmed yet.

    Declaration
    public int UnconfirmedCount { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    WarnAfterNumberOfUnconfirmedAttempts

    After this number of delivery attempts a UnconfirmedWarning message will be sent to Self. The count is reset after restart.

    The default value can be configure with the 'akka.persistence.at-least-once-delivery.warn-after-number-of-unconfirmed-attempts' configuration key.

    Declaration
    public int WarnAfterNumberOfUnconfirmedAttempts { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    AroundReceive(Receive, object)

    TBD

    Declaration
    public bool AroundReceive(Receive receive, object message)
    Parameters
    Type Name Description
    Receive receive

    TBD

    object message

    TBD

    Returns
    Type Description
    bool

    TBD

    | Edit this page View Source

    Cancel()

    TBD

    Declaration
    public void Cancel()
    | Edit this page View Source

    ConfirmDelivery(long)

    Call this method when a message has been confirmed by the destination, or to abort re-sending.

    Declaration
    public bool ConfirmDelivery(long deliveryId)
    Parameters
    Type Name Description
    long deliveryId

    TBD

    Returns
    Type Description
    bool

    True the first time the deliveryId is confirmed, false for duplicate confirmations.

    | Edit this page View Source

    Deliver(ActorPath, Func<long, object>, bool)

    TBD

    Declaration
    public void Deliver(ActorPath destination, Func<long, object> deliveryMessageMapper, bool isRecovering)
    Parameters
    Type Name Description
    ActorPath destination

    TBD

    Func<long, object> deliveryMessageMapper

    TBD

    bool isRecovering

    TBD

    Exceptions
    Type Condition
    MaxUnconfirmedMessagesExceededException

    This exception is thrown when the actor exceeds the MaxUnconfirmedMessages count.

    | Edit this page View Source

    GetDeliverySnapshot()

    Full state of the AtLeastOnceDeliverySemantic. It can be saved with SaveSnapshot(object). During recovery the snapshot received in SnapshotOffer should be set with SetDeliverySnapshot(AtLeastOnceDeliverySnapshot).

    The AtLeastOnceDeliverySnapshot contains the full delivery state, including unconfirmed messages. If you need a custom snapshot for other parts of the actor state you must also include the AtLeastOnceDeliverySnapshot. It is serialized using protobuf with the ordinary Akka serialization mechanism. It is easiest to include the bytes of the AtLeastOnceDeliverySnapshot as a blob in your custom snapshot.

    Declaration
    public AtLeastOnceDeliverySnapshot GetDeliverySnapshot()
    Returns
    Type Description
    AtLeastOnceDeliverySnapshot

    TBD

    | Edit this page View Source

    OnReplaySuccess()

    TBD

    Declaration
    public void OnReplaySuccess()
    | Edit this page View Source

    SetDeliverySnapshot(AtLeastOnceDeliverySnapshot)

    If snapshot from GetDeliverySnapshot() was saved it will be received during recovery phase in a SnapshotOffer message and should be set with this method.

    Declaration
    public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot)
    Parameters
    Type Name Description
    AtLeastOnceDeliverySnapshot snapshot

    TBD

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET