You must save a snapshot before deleting otherwise the delivery ids will be
messed up.

Support for snapshots is provided by getDeliverySnapshot and
setDeliverySnapshot. 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.

http://doc.akka.io/docs/akka/2.4.1/scala/persistence.html#At-Least-Once_Delivery



On Wed, Dec 16, 2015 at 12:07 PM, Christian Kaps <[email protected]>
wrote:

> Hi,
>
> Is it safe to call the deleteMessages method of a persistent actor with
> the current processed sequence number or is it possible that I delete a
> sequence number that hasn't been successfully confirmed because of an error.
>
> As example:
> I send two messages to an at-least-once-delivery actor. The actor is
> configured to resend the message 10 times, if it wasn't confirmed. Now I
> send two messages to this actor. Both messages can't be confirmed because
> of an error. Now the actor tries to resend the messages. The first one with
> sequence number 1 fails again but the second with sequence number 2 gets
> confirmed. So If delete now all sequence numbers less or equal 2, then the
> first message cannot be processed anymore. Or do I miss something?
>
> The documentation states that the delivery order for messages is not
> preserved due the possible resends. So for me it seems that the order of
> sequence numbers is also not preserved. Or are these two different things?
>
> Or does the actor tries to resend the first failed messages until it gets
> confirmed? And then it tries to resend the next and so forth.
>
> Best regards,
> Christian
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to