Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

At-Least-Once Delivery - 적어도 메시지를 한번 보내려는 메카니즘으로 PersistenceActor와 결합하여

목표를 달성할수 있습니다. 적어도 한번보내려는 메카니즘으로 인해 중복 메시지 발생에 유의하여 작성

해보겠습니다.


메시지설계

Code Block
languagebashc#
themeEmacs
public class Msg
{
    public Msg(long deliveryId, string message)
    {
        DeliveryId = deliveryId;
        Message = message;
    }

    public long DeliveryId { get; }

    public string Message { get; }
}

public class Confirm
{
    public Confirm(long deliveryId)
    {
        DeliveryId = deliveryId;
    }

    public long DeliveryId { get; }
}

public interface IEvent
{

}

public class MsgSent : IEvent
{
    public MsgSent(string message)
    {
        Message = message;
    }

    public string Message { get; }
}

public class MsgConfirmed : IEvent
{
    public MsgConfirmed(long deliveryId)
    {
        DeliveryId = deliveryId;
    }

    public long DeliveryId { get; }
}


...