Reputation: 3039
Base on Akka documentation:
If you want to verify that your Props are serializable you can enable the following config option:
akka {
actor {
serialize-creators = on
}
}
My question is Should Props
be serializable? Why?
Is it because of accessing ShardRegion
?
ClusterSharding.get(actorSystem)
.start("Devices", Device.props(x, y) , settings, new DeviceMessageExtractor(t));
Upvotes: 1
Views: 255
Reputation: 153
Props object should be serializable if you want to create actor remotely. This object will be sent to remote system than remote system will create actor.
Please look at "Creating Actors Remotely" section of https://doc.akka.io/docs/akka/current/remoting.html .
Upvotes: 4