Let's assume that instead of exceptions each flow instead follows this pattern: Flow[Request, Either[Error, Result], Unit]. You could build a custom flow that routes errors to one output and results to the other, then merge all the errors and results and send them to the sink. I've done this in some code for work, if you're interested I can put together a sanitized example.
On Tuesday, November 10, 2015 at 7:23:44 PM UTC-8, Leon Ma wrote: > > Hi, > > > Assuming I have below flow: > > Source(..).via(flow1).via(flow2).via(flow3)...via(flowN).toSink(..) > > > I'd like to model the stream that any exception happens will lead the > elements go to the very last flowN. (like a guardian fanalizer) > > For example, when processing elementA in flow2, we got an exception, it > will just skip any subsequent flow and goes to flowN directly. > > How can I do this? > > Thanks > Leon > > > > -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
