How it works...
In this recipe, we covered how to configure our app to use the Redis 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 akka-persistence-redis.journal and akka.persistence.snapshot-store.plugin to akka-persistence-redis.snapshot. We do that in application-redis.conf. We use this file when we run our apps by adding -Dconfig.resource in the sbt command. From the output, we can see how this example is working. To start with, we do not have any state stored, so we see Recovery completed. Current state: Vector(). Then, we send two ValueUpdate messages and a print message. Then, we verify that the state now contains ...
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