Java – how does akka handle message versions?

How does akka handle serialization of different versions of messages of the same type but different versions? For example, can actor x expecting version 1 of message a receive and process version 2 of message a from actor y with additional fields? How does it handle situations where version 3 of message a may have deleted or renamed fields?

Solution

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

In general, it is recommended to use serializers to enable you to design backward and forward compatibility, such as protobuf

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>