In our actor system, using sharding and persistence, the concrete instances of one of our ReceivePersistentActor
implementations are not re-used once they are terminated (passivated), as they represent client sessions identified by a GUID that is generated for each new session.
When a session ends, the ReceivePersistentActor
is responsible for cleaning up it's own persistence data and will call DeleteSnapshots
and DeleteMessages
, which works fine. Once these calls have been processed, the actor will Context.Parent.Tell(new Passivate(PoisonPill.Instance));
to terminate.
After that, the event journal will still contain an EntityStoppedManifest
entry ("CD"
), as this is generated through the Passivate
message.
Over time this will lead to many "CD"
entries remaining in the event journal.
Is there a recommended approach for cleaning up such residue entries?
Maybe a separate Janitor actor that cleans up these entries manually?
Or is this even a design flaw on our end?