persistAll is used, meaning that the state change event and the other
events are sent in one message to the journal. akka-persistence-cassandra
will write them in a batch. I don't think there is any/much overhead of
using separate events.

In general with event sourcing, it's good to have separate events for
different facts. In case you want to analyze the events it's easier to do
that with separate events, rather than one large blob.

Regards,
Patrik

On Wed, Apr 5, 2017 at 9:14 PM, Richard Ney <[email protected]> wrote:

> Was there a reason that the message and state journal messages are
> separated in the PersistentFSM?
>
> In an application with a large number of PersistentFSM based actors
> churning it ends up doubling the ops/sec to the journal repository.
>
> Wouldn't using a compound class like this:
>
>  case class PersistentStateEvent[E](stateIdentifier: String, messages:
> Seq[E]) extends Message
>
> work better and reduce the journal writes?
>
> Regards,
>
> Richard
>
> --
> >>>>>>>>>> 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.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
Twitter: @patriknw

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

Reply via email to