score:0

To continue the discussion in comments, As I see the solution to your problem:

Start with the main actor which performs db interaction. E.g. on message Start it updates database using Slick and saves Connection to actor's instance varibale and send messages to child actors. That actors have to send to your Main actor confirmation, for example message ConfirmTratnsaction. In the reaction on that message you perform commit on previously saved Connection and close it(or release it to the pool). Also, Main actor has to supervise that child actors. If that actor fail after sending message(or timeout occurs) you have to rollback transaction via saved Connection


Related Query

More Query from same tag