So for eg: I have actor X and Y.
Actor X persists message to journal, then it sends message to Y. Y receives message, and sends confirmation back to X to let it know have received message. When X receives this confirmation, I want it to a) delete the message from the journal so the message isn't replayed on recovery. (this part doesn't seem to be possible). b) "Mark" the message as completed (delivered). This part I think will be done with either the Log (using the log on recovery), or through adding "tags" to journal (through event adapter, but I am not sure if that's possible will update if its a viable option).
This makes me realize, how does akka persistence actually work. If a actor is persisting all messages, and then the actor fails and needs to recover, will it not recover all these messages regardless of delivery? I know it is to maintain state (so for fsm I get it), but if I have a supervisor actor that persists messages to then pass on to workers, surely I would want to be able to change this journals entries so that I wont recover (and then resend) messages that have already been processed? (so thats why I am asking, I am obviously missing something)