Since you cannot make these classes non-Serializable, ClusterMessage must also extend Serializable to make the mapping more specific. And since these classes will always be Serializable we’ll have to make sure that that actually works (i.e. we cannot not support java serialization of our messages).