- Bring the required dependencies to begin with.
- Edit the build.sbt file and add Akka Sharding and distributed data dependencies as follows:
libraryDependencies += "com.typesafe.akka" % "akka-cluster-sharding_2.11" % "2.4.17" libraryDependencies += "com.typesafe.akka" % "akka-distributed-data-experimental_2.11" % "2.4.17"
Then run sbt update to retrieve the dependencies from the central repository.
- Create a new file named application-cluster-sharding-1.conf in the src/main/resources directory with the following contents:
akka { actor { provider = "akka.cluster.ClusterActorRefProvider" } remote { log-remote-lifecycle-events = off enabled-transports = ["akka.remote.netty.tcp"] netty.tcp { hostname = "127.0.0.1" port = ...