Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Akka handle message versions?

How does Akka handle the serialization of different versions of messages of the same type, but different versions? For example, can an Actor X that expects version 1 of message A receive and process version 2 of message A from Actor Y that has an extra field? How does it handle the case where version 3 of message A might have removed or renamed a field?

like image 434
Derek Mahar Avatar asked Oct 21 '22 19:10

Derek Mahar


1 Answers

It depends on the serializer used. Akka has configurable serialization, so you have many options (see docs: http://doc.akka.io/docs/akka/2.1.0/scala/serialization.html).

In general, it is recommended to use a serializer that enables you to design for backward and forward compatibility, for example Protobuf.

like image 149
Endre Varga Avatar answered Oct 31 '22 20:10

Endre Varga