A SerDe (serializer-deserializer) converts structured actor messages and persistent events into storable representations and reconstructs them when needed. Persistent actors use it to restore events from a journal. section 9.3.5
In an event-sourced Akka application, a SerDe governs several operational details:
- It binds persisted events to a format such as CborSerializable, Jackson CBOR, or Jackson JSON. section 9.3.5 section 9.4
- It must deserialize older event versions when application schemas evolve. section 9.3.5
- Akka serializers use identifiers from 0 through 40; custom SerDes must use an identifier above 40. section 9.4
- Serialized events remain immutable journal facts; compatibility should accommodate old data rather than rewrite it. section 9.3.5
Evolving AddCargo
An event initially records AddCargo(id, kind, size). A later version adds loadedBy, producing a newer CargoAdded shape. Older journal entries lack that field, so compatible deserialization must interpret multiple versions and load old events into the new event type without changing the journal. section 9.3.5
Table 9.1 Journal entries in the database table public.journal_events (view table figure)
The journal table shows where the serializer identifier and binary event payload are stored alongside persistence and sequence metadata. section 9.4

