Hi Martin/others, When using EventsourcedProcessor, whilst the underlying persistence mechanism will associate a sequence number with any event persisted, I still see some value in being able to persist the sequence number within the custom event payload. For example, say I have an event payload such as:
case class Event(id: UUID, correlationId: UUID, sequenceNumber: Long, data: Any) - id = the unique id of an aggregate root - correlationId = the correlation id of the command that was executed to spawn the event - sequenceNumber - the sequence number of the event for the given aggregate root - data - the internal payload which would vary depending on actual event that has occurred in the system (e.g. CustomerCreated) Using EventsourcedProcessor, I'd like to pass such a representation to the persist(...) method. However, at that point, the only way I can determine what sequence number will be persisted with an event is to take the current sequence number and increment by 1 - if I am persisting multiple events, I'll have to increment by 2, 3, 4 etc. I am okay to anticipate the sequence numbers prior to persistence? Also, do you think I'm being unnecessarily pedantic to want to keep everything related to an event within my own payload? Thanks, Andrew -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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/groups/opt_out.
