Docs: need to mention SaveSnapshot state must be passed in immutable manner #5058
Description
Please describe what you are trying to understand
I recently went through exactly same issue with #4451 and I did exactly what he did. I even looked through JVM document and sources.
Which pages have you looked at?
https://getakka.net/articles/persistence/snapshots.html
What did these pages not make clear?
in classic Akka all messages must be immutable, and since you are putting your state inside a message (SaveSnapshot), then it needs to be immutable as well.
How can we do it better?
Please mention this in the doc
Additional suggestions
I'm not sure why both https://doc.akka.io/docs/akka/current/persistence.html and https://getakka.net/articles/persistence/snapshots.html not mentioning anything about immutable -- is there any chance that the JVM does it implicitly?