Usage Configurationįor Akka to know which Serializer to use for what, you need edit your Configuration, in the “”-section you bind names to implementations of the rialization. Removing writeObject / readObject methods - If the class reading the stream does not have these methods, the required data will be read by default serialization.
However, the serialization mechanism in Akka allows you to write custom serializers and to define which serializer to use for what. the objects have to be converted to and from byte arrays).Īkka itself uses Protocol Buffers to serialize internal messages (i.e. However, messages that have to escape the JVM to reach an actor running on a different host have to undergo some form of serialization (i.e. Message passing between actors that live on the same JVM is straightforward. The messages that Akka actors send to each other are JVM objects (e.g. To use Serialization, you must add the following dependency in your project: sbt libraryDependencies += '' %% 'akka-actor' % '2.5.25' Maven Ĭompile group: '', name: 'akka-actor_2.12', version: '2.5.25'