How it works...
In this recipe, we covered how to configure our app to use the Cassandra plugin. First, we need to ensure we have the right dependencies, and for that, we use sbt to bring them. Then, we need to configure akka.persistence.journal.plugin to cassandra-journal and akka.persistence.snapshot-store.plugin to cassandra-snapshot-store. We do that in application-cassandra.conf. We use this file when we run our apps by adding -Dconfig.resource in the sbt command. We can see from the output how this example is working. To start with, we do not have any state stored, so we see Recevery completed. Current state: Vector(). Then, we send two ValueUpdate messages and a print message. Then, we verify that the state now contains both values. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access