Hi ,
I want to start using actors with heavy rate messages . actor's last state
is very important
I was following the persistence example shown at
here http://doc.akka.io/docs/akka/2.3.9/scala/persistence.html#event-sourcing
I tried to send a heavy load of messages
for (i <-0 to 100000){
persistentActor ! Cmd("foo"+i)
}
and using the persistAsync like this
val receiveCommand: Receive = {
case Cmd(data) =>
persistAsync(Evt(s"${data}-${numEvents}"))(updateState)
case "snap" => saveSnapshot(state)
case "print" => println(state)
}
before shutdown I added Thread.sleep(150000) to make sure that all persists .
at first all seems to be ok , however re-running the app shows that some are
going to dead-letter
*[INFO] [02/03/2015 15:35:18.187] [example-akka.actor.default-dispatcher-3]
[akka://example/user/persistentActor-4-scala] Message [java.lang.String] from
Actor[akka://example/deadLetters] to
Actor[akka://example/user/persistentActor-4-scala#1206460640] was not
delivered. [1] dead letters encountered. This logging can be turned off or
adjusted with configuration settings 'akka.log-dead-letters' and
'akka.log-dead-letters-during-shutdown'.
[INFO] [02/03/2015 15:35:18.192] [example-akka.actor.default-dispatcher-3]
[akka://example/user/persistentActor-4-scala] Message
[akka.persistence.Recover] from
Actor[akka://example/user/persistentActor-4-scala#1206460640] to
Actor[akka://example/user/persistentActor-4-scala#1206460640] was not
delivered. [2] dead letters encountered. This logging can be turned off or
adjusted with configuration settings 'akka.log-dead-letters' and
'akka.log-dead-letters-during-shutdown'.
*
or getting something like :
*[INFO] [02/03/2015 15:54:32.732]
[example-akka.actor.default-dispatcher-11]
[akka://example/user/persistentActor-4-scala] Message
[akka.persistence.JournalProtocol$ReplayedMessage] from
Actor[akka://example/deadLetters] to
Actor[akka://example/user/persistentActor-4-scala#-973984210] was not
delivered. [1] dead letters encountered. This logging can be turned off or
adjusted with configuration settings 'akka.log-dead-letters' and
'akka.log-dead-letters-during-shutdown'.*
*[INFO] [02/03/2015 15:54:32.735] [example-akka.actor.default-dispatcher-3]
[akka://example/user/persistentActor-4-scala] Message
[akka.persistence.JournalProtocol$ReplayedMessage] from
Actor[akka://example/deadLetters] to
Actor[akka://example/user/persistentActor-4-scala#-973984210] was not
delivered. [10] dead letters encountered, no more dead letters will be
logged. This logging can be turned off or adjusted with configuration
settings 'akka.log-dead-letters' and
'akka.log-dead-letters-during-shutdown'.*
*#*
*# A fatal error has been detected by the Java Runtime Environment:*
*#*
*# SIGSEGV (0xb) at pc=0x00007fa2a3e06b6a, pid=18870, tid=140335801857792*
*#*
*# JRE version: Java(TM) SE Runtime Environment (7.0_71-b14) (build
1.7.0_71-b14)*
*# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.71-b01 mixed mode
linux-amd64 compressed oops)*
*# Problematic frame:*
*# V [libjvm.so+0x97bb6a] Unsafe_GetNativeByte+0xaa*
*#*
*# Failed to write core dump. Core dumps have been disabled. To enable core
dumping, try "ulimit -c unlimited" before starting Java again*
*#*
*# An error report file with more information is saved as:*
*# /home/tadmin/projects/akka-sample-persistence-scala/hs_err_pid18870.log*
*#*
*# If you would like to submit a bug report, please visit:*
*# http://bugreport.sun.com/bugreport/crash.jsp*
*#*
how can I persist a state of an actor that should handle heavy rate of messages
?
Thanks
Avi
--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.