Search code examples
javajvmakkaakka-remote-actorakka-remoting

java akka default serializer warning


I do not want to disable warning messages, as I want to know how to fulfill the suggestion to define serializer in order to improve performance?

[INFO] [06/24/2016 19:28:34.659] [main] [akka.remote.Remoting] Starting remoting
[INFO] [06/24/2016 19:28:34.827] [main] [akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://[email protected]:41999]
[INFO] [06/24/2016 19:28:34.829] [main] [akka.remote.Remoting] Remoting now listens on addresses: [akka.tcp://[email protected]:41999]
[WARN] [06/24/2016 19:28:35.303] [requesterActorSystem-akka.remote.default-remote-dispatcher-13] [akka.serialization.Serialization(akka://requesterActorSystem)] Using the default Java serializer for class [com.typesafe.config.impl.SimpleConfig] which is not recommended because of performance implications. Use another serializer or disable this warning using the setting 'akka.actor.warn-about-java-serializer-usage'

Solution

  • Check this page, it is explained: http://doc.akka.io/docs/akka/current/scala/serialization.html

    In your case the default Java serializer is used, but as it is said, it is slow, so for performance reasons, it's better to use something like Protobuf or use you own serializer.