I've been working on some relatively complicated Akka streams flows, large 
enough to make more sense when composed, and I've been a bit frustrated as 
to how to do localized error handling, as the current mechanism is attached 
to materialization. I'd post code, but I don't have approval for open 
sourcing just yet, so I apologies if I am not quite as specific as you'd 
all like.

I have two flows, relatively complicated, that depend on each other. From 
flow A, we get to flow B. and if there is an error in B, what I want to do 
is to just go back and retry them both in order, with maximum number of 
times. If it goes past that, then let the flow fail. If this was all I 
needed, I could use the supervisor strategy to just restart the flow on 
error. But I'd rather not materialize this A+B flow, just to be able to use 
the current error handling system.

I believe that this leaves me doing something like making flow B return a 
try or a tuple, build a custom fan out operation that separates the success 
and the error, have some counting mechanism (maybe a source with retry 
counts?), and have something that, if the retry count is higher than our 
current count policy, throws an error that I will not catch. It seems like 
something that could be built generically, as a retry system for arbitrary 
flows seems like a non-uncommon problem that could be reused. It could even 
use exponential backoff in the right problem sets.

So I wonder if building an infrastructure like that is something that makes 
sense for my problem, if there are simpler solutions, or if I the right 
idea is just to wait and see if a more composable supervisory strategy is 
added to Akka streams, as it's still a pretty young library. Thoughts on 
the matter would be appreciated.


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to