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
- Send Akka messages with database update
- How can I send messages to a remote actor via CLI with Akka remoting?
- Is there a way to send messages typed with my own classes to an Akka remote actor?
- How send messages to akka system in neighbouring jvm?
- How to send HTTP request using Akka with SSL certificates
- Mocking database with Slick in ScalaTest + Mockito and testing UPDATE
- How to send messages between Akka remote actors?
- Akka Stream and HTTP Scala: How to send Messages to an Actor from a Route
- Akka (Scala) - testing messages with paramters iwth TestKit
- Processing SOAP messages with Akka
- Update iplookUp cache periodically with original database file
- How to send and receive protobuf messages over Akka Tcp
- Tcp request to the database with akka streams
- Unable To Receive Kafka Messages at kafka consumer side with akka kafka kerberos configuration
- Update rows with composite primary key generated from database with slick codegen
- Cant send and receive other messages than Strings between AKKA actors
- remote akka actor error to send serializable messages
- Scala Akka Typed - send request inside behavior with ask
- Akka Streams: How to update one field with the result of the future
- Akka Graph with throttling messages
- My log messages are working for one file with akka typed, but not for classic actor
- akka streams with spark streaming: messages are not delivered to actor; getting dead letters
- Akka routing messages with single running instance per id
- Scala protobuffer messages using wrong serializer with Akka Remoting
- Akka routers to send messages to workers
- Why Receptionist.Subscribe first messages in Akka don't contain all cluster members registered with the specified key?
- How to send file in response with name in akka http
- UPDATE table in SQL SERVER database with data in HIVE using Spark
- How to get started with Akka Streams?
- How to update a mongo record using Rogue with MongoCaseClassField when case class contains a scala Enumeration
More Query from same tag
- scala - mapValues to for comprehension conversion error
- Using regular expression in spark
- How to serialize objects from/to json in spray with defaultFormats?
- How to acquire actor reference to typed actor implementation in Akka?
- Running Spark Slave on Windows
- Spark: reading tables and filtering by partition
- Scala child class fails to recognize a generic map in the parent?
- how to add empty bracket in array of string
- Class X Takes Types Parameters
- How to display results of intermediate transformations of streaming query?
- read from hdfs write to kafka using scala spark,but get NullPointerException
- Spark Dataframe GroupBy and compute Complex aggregate function
- How do I constrain a member of a parameter class to match the instance of an outer class?
- Filter Dataframe rows for Maptype Keys
- scala type with plus sign in front
- Can I map over a list and expand it at the same time in Scala?
- scalaz, Disjunction.sequence returning a list of lefts
- Is there a way in a Scala after() method to know whether the test failed?
- Recursive sort in scala with tail recursion
- Which is better framework Java/GWT or Scala/Lift?
- Returning object of type specified in method arguments instead of AnyRef
- Scala - Alternative to nested for loops while writing out
- Split sbt release in stages?
- Gatling scenario with 10 requests per hour (less that 1 rps)
- Maintaining request parameters across controller and view in Play Framework
- How to reduce() on a collection keeping the collection itself in Scala?
- Akka combining Sinks without access to Flows
- Scala - groupBy and count instances of each value
- Integrate SecureSocial with backend user services/storages?
- How to get the actual type of primitive type parameter in Scala Seq[T] or Option[T]?