[akka-stream] Detect failure in MergeHub

45 views
Skip to first unread message

Victor

unread,
Oct 18, 2016, 8:28:14 AM10/18/16
to Akka User List
Hi,

It's written in the ScalaDoc of the MergeHub.source method that:

If one of the inputs fails the Sink, the Source is failed in turn

But, in the MergeHub source code, the onUpstreamFailure method only throw an exception:

override def onUpstreamFailure(ex: Throwable): Unit = {
 
throw new MergeHub.ProducerFailed("Upstream producer failed with exception, " +
   
"removing from MergeHub now", ex)
}

So maybe I'm missing something, but why failing an input will fails the Source?
I need the MergeHub to fails when an input fails, but it doesn't seems to work.

Thanks,
Victor

johannes...@lightbend.com

unread,
Oct 18, 2016, 8:36:35 AM10/18/16
to Akka User List
Hi Victor,

good point. I think the Scaladoc is wrong there. Could you raise an issue at akka/akka?

Johannes

Victor

unread,
Oct 18, 2016, 8:50:52 AM10/18/16
to Akka User List
Reply all
Reply to author
Forward
0 new messages