Just use persist() to persist messages.
Snapshotting should not be used for every message - it should be used once
in a while.

— konrad
​

On Fri, Nov 21, 2014 at 7:40 AM, Karthik Chandraraj <ckarthi...@gmail.com>
wrote:

> Hi,
>
> As per the suggestion, I implemented a QueueActor, which will saveSnapshot
> for every message it receives or removed. And then a ProcessActor, which
> will read the message from the QueueActor to process it.
>
> Is this the right way to implement durable mailbox with akka-persistence?
> Problem I see with this approach is, for every message, the data is
> written to the file. Can we achieve durability only with this performance
> hit?
>
> Thanks,
> C.Karthik
>
>
> On Thursday, November 13, 2014 7:58:01 PM UTC+5:30, Martynas Mickevičius
> wrote:
>>
>> Hi Karthik,
>>
>> akka-persistence does not replace but supersede durable mailboxes. That
>> means if one wants to have an Actor that does not loose messages upon being
>> killed then sender must use AtLeastOnce delivery trait (or some other means
>> of durability with akka-persistence or not) to deliver messages to that
>> Actor.
>>
>> Let me know if that helped.
>>
>> On Wed, Nov 12, 2014 at 2:03 PM, Karthik Chandraraj <ckart...@gmail.com>
>> wrote:
>>
>>> Consider there are 100 messages in the mailbox and the actor is
>>> processing the first.
>>> If the process is killed, what happens to the 99 messages?
>>>
>>> When I was searching about this, I came across durable mailboxes, but
>>> the doc says 'durable mailboxes superseded by akka-persistence'.
>>> When I went though akka persistence, it said the actor state can be
>>> persisted, it doesn't talk about mailboxes? using akka-persistence, actors
>>> state can be stored, but what about messages that are in the mailbox and
>>> not received?
>>>
>>> can someone please explain?
>>>
>>> --
>>> >>>>>>>>>> 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 akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Martynas Mickevičius
>> Typesafe <http://typesafe.com/> – Reactive
>> <http://www.reactivemanifesto.org/> Apps on the JVM
>>
>  --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to