I'm using Akka actors in Scala for parallel processing of queue items. I have a MasterActor with 10 reusable child ProcessorActors.
Items being processed can be of different types, e.g. red, blue & green items. At one moment of time, only a single item of some type can be processed. Thus, if one red item is being processed, no more reds can be processed at the same time.
All is fine but now I try to implemented good fault tolerance for the app and it turns out I can't get much info about what item type failed in Terminated message. If ProcessorActor fails, I need to mark appropriate type in MasterActor as available for processing. Right now I'm stuck as I just can't get what item type failed. I have an ActorRef in Terminated message but afaiu it's not good to send messages to it right after I get that message.
In the end I can be left with all possible types marked as "being processed" while in reality it's just their appropriate actors are dead.
Please advice.