Kryo not serializing configured classes
Closed this issue · 1 comments
fedenusy commented
For some reason, kryo serialization is not working. Even though (I think) I set up kryo properly, the following warning keeps popping up:
WARN 17:42:27.913UTC akka.serialization.Serialization(akka://vw) - Using the default Java serializer for class [life.vw.client.ConciergeTracker$StatusUpdate] which is not recommended because of performance implications. Use another serializer or disable this warning using the setting 'akka.actor.warn-about-java-serializer-usage'
My build.sbt has this dependency:
"com.github.romix.akka" %% "akka-kryo-serialization" % "0.4.1"
I'm using akka 2.4.8 and scala 2.11.8. Here are the relevant portions of my application.conf:
akka {
...
extensions = [
"akka.cluster.pubsub.DistributedPubSub",
"com.romix.akka.serialization.kryo.KryoSerializationExtension$"
]
actor {
...
kryo {
type = "graph"
idstrategy = "automatic"
buffer-size = 4096
max-buffer-size = -1
use-manifests = false
post-serialization-transformations = "lz4"
kryo-trace = false
implicit-registration-logging = true
mappings {
"life.vw.client.ConciergeTracker$StatusUpdate" = 30,
"life.vw.client.Connection$Write" = 31
}
}
}
serializers {
kryo = "com.romix.akka.serialization.kryo.KryoSerializer"
}
serialization-bindings {
"life.vw.client.ConciergeTracker$StatusUpdate" = kryo
"life.vw.client.Connection$Write" = kryo
}
...
}
Any idea why the warning keeps popping up? Could it have something to do with the DistributedPubSub extension?
fedenusy commented
I was supposed to nest serializers
and serialization-bindings
under akka.actor
T_T