You don’t remove things in an event sourced application.
You mark as deleted.

A
B
C
DEL-A
DEL-B
D
DEL-C

— konrad

On 24 November 2014 at 14:08:37, Karthik Chandraraj (ckarthi...@gmail.com) 
wrote:

The reason why I used snapshot instead of persist message is, I need to remove 
the message from the queue on processing it.
In case of snapshot, I will just remove it from the linked queue and save the 
snapshot.
How can I achieve the same using persist message?

For ex:
Consider I have received the 5 messages
A,B,C,D,E and I have persisted them.

Now another actor is reading this queue and processing A, once it is done, I 
need to remove it from the queue.
How can I remove the persisted message A? so that after restart or jvm crash, I 
won't process the message again?


On Saturday, November 22, 2014 3:30:48 PM UTC+5:30, Akka Team wrote:
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 <ckart...@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 – Reactive 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+...@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.



--
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.
-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe
http://akka.io

-- 
>>>>>>>>>>      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