Akka.Hosting
Akka.Hosting copied to clipboard
`WithCustomSerializer` needs to add ability to specify serialization identifier
Version Information Version of Akka.NET? 1.0.1 Which Akka.NET Modules? Akka.Hosting
Describe the bug
One thing that Akka.Hosting can't currently do is specify the akka.actor.serialization-identifiers section of HOCON:
akka.actor{
# This is to get the manifest back in the event journal
serializers {
json2 = "JsonSerializerWithManifest, MyInfrastructure"
}
serialization-bindings {
"System.Object" = json2
}
serialization-identifiers {
"JsonSerializerWithManifest, MyInfrastructure" = 410
}
}
With the current WithCustomerSerializer method we can't specify this - instead we have to rely on the serializer hard-coding it by overriding the Serializer.Identifer property
.WithCustomSerializer("json2", new[]{ typeof(object) }, system => new JsonSerializerWithManifest(system))
Hmm, this is going to require an Akka.NET update (to SerializerDetails) or a HOCON work-around...