I asked this on SO without any responses. Thought I'd x-post here. I'm 
wondering if there's any sane way to make this graph fail, or if I'm just 
thinking about this in the entirely wrong way:

def flow(n: String) = Flow[Int].map{v => println(s"$n: $v"); v + 1}
val g = Source.fromGraph(GraphDSL.create() { implicit b =>
    import GraphDSL.Implicits._

    val broadcast = b.add(Broadcast[Int](2))
    val source = b.add(Source.single(1))

    source ~> flow("A") ~> broadcast

    broadcast.out(1) ~> flow("B") ~> flow("C").mapAsync(1){ _ => 
Future.failed(new Exception())} ~> Sink.foreach[Int](f => println("OK"))

    SourceShape(broadcast.out(0))})



http://stackoverflow.com/questions/35420779/failing-an-akka-stream-graph-if-a-downstream-branch-fails

-- 
>>>>>>>>>>      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