Hi Andrey, The purpose of ”rejected” is when it’s known that the event was not stored. Typically something that happens before the data store is called, such as serialization error. ”failed” is more uncertain. It might have been stored, it might not. E.g. A timeout of a db call.
For rejected the PA continues. For failed it is stopped, possibly followed by a restart/recovery that will read the event (or not) to get to the right state. I don’t know if the Elasticsearch plugin implements it correctly. One problem with rejected is that it leaves gaps in the sequence numbers of the stored events. Gapless is very nice when reading events to be sure you don’t miss any events, eg eventsByTag query. That is why for example the Cassandra plugin doesn’t use rejected at all. /Patrik fre 26 jan. 2018 kl. 20:28 skrev Andrey Ilinykh <[email protected]>: > Hello everybody! > > I've got a question about onPersistRejected / onPersistFailure methods of > PersistenceActor. The documentation says onPersistRejected is called if > there is a problem before persist call, > and onPersistFailure used to report failures related to persistence > problem. > I don't see such behavior. I use akka-persistence-elasticsearch plugin, > even if I shutdown elasticsearch I see only onPersistRejected calls. This > is, actually, what I need, but it is not supposed to happen. > Could someone shed some light on this issue? > > Thank you, > Andrey > > -- > >>>>>>>>>> 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. > -- >>>>>>>>>> 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.
