The following code fails to run with the exception 
*java.lang.IllegalStateException: 
FanoutOutputs only supports one subscriber (which is allowed, see 
reactive-streams specification, rule 1.12)*:
  val bcast = Broadcast[String]
  val merge = Merge[String]
  val in1 = IterableSource(List("a"))
  val in2 = IterableSource(List("b"))
  val out1 = PublisherSink[String]
  val out2 = PublisherSink[String]

  val graph = FlowGraph { implicit b ⇒
    import FlowGraphImplicits._

    in1 ~> FlowFrom[String] ~> merge
    in2 ~> FlowFrom[String] ~> merge
    merge ~> FlowFrom[String] ~> bcast
    bcast ~> FlowFrom[String] ~> out1
    bcast ~> FlowFrom[String] ~> out2
  }.run()

  val out1Probe = StreamTestKit.SubscriberProbe[String]()
  val out2Probe = StreamTestKit.SubscriberProbe[String]()

  FlowFrom(out1.publisher(graph))
    .publishTo(out1Probe)

  FlowFrom(out2.publisher(graph))
    .publishTo(out2Probe)

A similar result can be obtained by using the *build wikipedia 
Topological_sorting* in FlowGraphCompileSpec.scala and wiring up at least 
two out nodes to subscribers (except that the exception pertains to 
SimpleOutputs).

Any help in understanding this issue further or how one should debug such 
issues would be greatly appreciated.

Many thanks,

Carl.

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

Reply via email to