- You should upgrade to akka-kryo-serialization 2.5.x before migrating to pekko-kryo-serialization.
- To support efforts for live migration from Akka to Pekko, compat modules are available in both Akka and Pekko Kryo Serialization to help with wire compatibility of custom messages containing ActorRefs and ByteStrings.
Then configure (or derive from if using a custom initializer)
# on Pekko libraryDependencies += "io.altoo" %% "pekko-kryo-serialization-akka-compat" % "1.0.1" # on Akka libraryDependencies += "io.altoo" %% "pekko-kryo-serialization-akka-compat" % "2.5.2"
AkkaCompatKryoInitializer
on Pekko, andPekkoCompatKryoInitializer
on Akka.# on Pekko pekko-kryo-serialization.kryo-initializer = "io.altoo.pekko.serialization.kryo.compat.AkkaCompatKryoInitializer" # on Akka kka-kryo-serialization.kryo-initializer = "io.altoo.akka.serialization.kryo.compat.PekkoCompatKryoInitializer"
EnumerationSerializer
has been deprecated with 2.4.2, with 2.5.0 default serializer forscala.Enumeration
has been switched toEnumerationNameSerializer
, which is not backwards compatible.
No manual steps required
No manual steps required
java.util.Record
serialization compatibility has been broken by Kryo 5.2. If serialized records must be read, backwards compatibility can be enabled, see kryo-5.2.0 release notes for more details.
No manual steps required
- By moving to Kryo 5 data created by a previous versions is unlikely to be readable with this version. Please refer to Kryo's Migrationto v5 guide for hints how to migrate data if necessary.
- Deprecated
io.altoo.akka.serialization.kryo.LegacyKeyProvider
has been removed, theDefaultKeyProvider
can be extended and be configured to provide the same behaviour. - Deprecated
io.altoo.akka.serialization.kryo.serializer.scala.ScalaProductSerializer
has been removed since since the standard kryo serializer should be used instead. Persistent data created by previous versions would have to be migrated manually. - Scala collection class mappings provided by
optional-basic-mappings
have been extracted intooptional-scala2_12-mappings
andoptional-scala2_13-mappings
and can be merged if needed.
- The deprecated
legacyAes
encryption mode has been removed. Any persistent data encrypted with the old format has to be manually migrated to a safer GCM based AES encryption.
- Move serializer configuration from
akka.actor.kryo
toakka-kryo-serialization
- Change akka serialization configuration to the new package name:
akka { actor { serializers { kryo = "io.altoo.akka.serialization.kryo.KryoSerializer" } } }
KryoSerializationExtension
is no longer necessary and must be removed from akka configuration.- If you were using the scala serializers independently adapt imports from
com.romix.scala.serialization.kryo
toio.altoo.akka.serialization.kryo.serializer.scala
. - Configuration property
idstrategy
has been re-named toid-strategy
and the default has been changed fromincremental
todefault
. Please read the documentation provided in the reference.conf for the different strategies and implications. - The configuration property
kryo-custom-serializer-init
has been replaced withkryo-initializer
and requires the initialize class to extend theDefaultKryoInitializer
. - The configuration property
kryo-default-serializer
has been removed and setting the default field serializer can be done by subclassing theDefaultKryoInitializer
. - The configuration property
custom-queue-builder
has been replaced withqueue-builder
and now requires the custom queue build to extend theDefaultQueueBuilder
. - The configuration property
encryption.aes.custom-key-class
has been replaced withencryption.aes.key-provider
and requires the custom key provider to extend theDefaultKeyProvider
. - The old encryption scheme is deemed problematic due to lacking authentication, if you have persisted data written in the old format configure
legacyAes
as post serialization transformation. Configure theio.altoo.akka.serialization.kryo.LegacyKeyProvider
to provide the correct key using the old scheme. Example configuration:encryption { aes { key-provider = "io.altoo.akka.serialization.kryo.LegacyKeyProvider" mode = "AES/CBC/PKCS5Padding" iv-length = 16 key = j68KkRjq21ykRGAQ } }
If there are any further questions, please don't hesitate and open an issue on GitHub.