Resume-able Flows

With Akka actors we can use persistent actors to resume data processing when a part of the system goes down. I’m trying to achieve the same in the context of Akka Streams.

Say I have a flow for real-time data, with an inlet and and outlet, and a lot of costly stateful computation in-between. If the system goes down, I’d like to avoid feeding tons of historical data into the flow to get it’s state back to the here-and-now.

My hypothetical solution is this: Wrap the flow in a persistent Actor, and upon each snapshot serialise the entire flow. On restart, deserialise the flow and continue feeding in the missing messages. I haven’t tried it yet (are flows serializable?).

Is that a feasible solution, and/or is there a better approach? Thanks