Hi,

Calling the persist or persistAsync from a future created during 
receiveCommand does not call the preceding handler and doesn't produce an 
error event neither.

class PublisherActor extends PersistentActor {
  def receiveCommand: Receive = {
    case cmd: MyCmd => {
      println("cmd received!")
      send(cmd) recover { // send is an async operation returning a future
        case t => {
          println("persisting...")
          persistAsync(cmd)(c => println("persisted!!!")
        }
      }
    }
    case _ => println("received other cmd!")
  }
}

running the code above (when the send future throws an exception) prints:
cmd received!
persisting...

but "persisted!!!" is not printed - moving the persistAsync line of code 
outside the future call (before 'send') works fine, any ideas why calling 
inside the future does not work for me?

Thanks,
Joel

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