Show / Hide Table of Contents

    Class DeDuplicatingReceiveActor

    Inheritance
    System.Object
    DeDuplicatingReceiveActor
    Namespace:Akka.Persistence.Extras
    Assembly:Akka.Persistence.Extras.dll
    Syntax
    public abstract class DeDuplicatingReceiveActor : ReceivePersistentActor

    Constructors

    DeDuplicatingReceiveActor()

    Declaration
    protected DeDuplicatingReceiveActor()

    DeDuplicatingReceiveActor(DeDuplicatingReceiverSettings)

    Declaration
    protected DeDuplicatingReceiveActor(DeDuplicatingReceiverSettings settings)
    Parameters
    Type Name Description
    DeDuplicatingReceiverSettings settings

    Properties

    CurrentConfirmationId

    The current id of the most recent IConfirmableMessage. This value is null if IsCurrentMessageConfirmable is false.

    Declaration
    public long? CurrentConfirmationId { get; }
    Property Value
    Type Description
    System.Nullable<System.Int64>

    CurrentSenderId

    The current sender id of the most recent IConfirmableMessage. This value is null if IsCurrentMessageConfirmable is false.

    Declaration
    public string CurrentSenderId { get; }
    Property Value
    Type Description
    System.String

    IsCurrentMessageConfirmable

    Is the message we are currently processing IConfirmableMessage?

    Declaration
    public bool IsCurrentMessageConfirmable { get; }
    Property Value
    Type Description
    System.Boolean

    Settings

    The settings for this actor.

    Declaration
    public DeDuplicatingReceiverSettings Settings { get; }
    Property Value
    Type Description
    DeDuplicatingReceiverSettings

    Methods

    AroundReceive(Receive, Object)

    Declaration
    protected override bool AroundReceive(Receive receive, object message)
    Parameters
    Type Name Description
    Receive receive
    System.Object message
    Returns
    Type Description
    System.Boolean

    ConfirmAndReply(Object, IActorRef)

    Utility method for automatically calling ConfirmDelivery() and sending a reply generated by CreateConfirmationReplyMessage(Int64, String, Object) to the current sender if an additional is not specified.

    Declaration
    protected virtual void ConfirmAndReply(object currentMessage, IActorRef replyTarget = null)
    Parameters
    Type Name Description
    System.Object currentMessage

    The current message processed by the actor.

    IActorRef replyTarget

    Optional. A reference to the actor to whom we should reply.

    ConfirmDelivery()

    Declaration
    protected void ConfirmDelivery()

    CreateConfirmationReplyMessage(Int64, String, Object)

    Declaration
    protected abstract object CreateConfirmationReplyMessage(long confirmationId, string senderId, object originalMessage)
    Parameters
    Type Name Description
    System.Int64 confirmationId
    System.String senderId
    System.Object originalMessage
    Returns
    Type Description
    System.Object

    HandleDuplicate(Int64, String, Object)

    This method gets invoked when IsDuplicate() has already returned true for the current message. Can be overriden by end-users. By default it automatically sends the message produced by CreateConfirmationReplyMessage(Int64, String, Object)\ to the current .

    Declaration
    protected virtual void HandleDuplicate(long confirmationId, string senderId, object duplicateMessage)
    Parameters
    Type Name Description
    System.Int64 confirmationId

    The correlation id of the current message.

    System.String senderId

    The id of the sender of the current message.

    System.Object duplicateMessage

    The original message handled by this actor.

    IsDuplicate()

    Declaration
    protected bool IsDuplicate()
    Returns
    Type Description
    System.Boolean

    PostStop()

    Cancels the pruning task on the scheduler.

    Declaration
    protected override void PostStop()
    In This Article
    • Constructors
      • DeDuplicatingReceiveActor()
      • DeDuplicatingReceiveActor(DeDuplicatingReceiverSettings)
    • Properties
      • CurrentConfirmationId
      • CurrentSenderId
      • IsCurrentMessageConfirmable
      • Settings
    • Methods
      • AroundReceive(Receive, Object)
      • ConfirmAndReply(Object, IActorRef)
      • ConfirmDelivery()
      • CreateConfirmationReplyMessage(Int64, String, Object)
      • HandleDuplicate(Int64, String, Object)
      • IsDuplicate()
      • PostStop()
    Back to top Copyright © 2015-2018 Petabridge®