[ERROR] Partition.out0 is already connected

[ERROR] [StreamSupervisor-0)] [error logging] Upstream failed.
java.lang.IllegalArgumentException: [Partition.out0] is already connected
at akka.stream.scaladsl.GraphDSL$Builder.addEdge(Graph.scala:1565)
at akka.stream.scaladsl.GraphDSL$Implicits$CombinerBase.$tilde$greater(Graph.scala:1722)
at akka.stream.scaladsl.GraphDSL$Implicits$CombinerBase.$tilde$greater$(Graph.scala:1721)
at akka.stream.scaladsl.GraphDSL$Implicits$PortOpsImpl.$tilde$greater(Graph.scala:1784)
at fr.laposte.colis.uds.UdsApp$.$anonfun$indexDocumentsFromSuccessMessageFlow$4(UdsApp.scala:72)
at akka.stream.scaladsl.GraphApply.create(GraphApply.scala:17)
at akka.stream.scaladsl.GraphApply.create$(GraphApply.scala:15)
at akka.stream.scaladsl.GraphDSL$.create(Graph.scala:1529)
at fr.laposte.colis.uds.UdsApp$.$anonfun$indexDocumentsFromSuccessMessageFlow$1(UdsApp.scala:70)
at akka.stream.scaladsl.GraphApply.create(GraphApply.scala:17)
at akka.stream.scaladsl.GraphApply.create$(GraphApply.scala:15)
at akka.stream.scaladsl.GraphDSL$.create(Graph.scala:1529)
at fr.laposte.colis.uds.UdsApp$.indexDocumentsFromSuccessMessageFlow(UdsApp.scala:57)
at fr.laposte.colis.uds.UdsApp$.$anonfun$graph$2(UdsApp.scala:172)
at akka.stream.scaladsl.RestartWithBackoffSource$$anon$1.startGraph(RestartSource.scala:198)
at akka.stream.scaladsl.RestartWithBackoffLogic.preStart(RestartFlow.scala:389)
at akka.stream.impl.fusing.GraphInterpreter.init(GraphInterpreter.scala:306)
at akka.stream.impl.fusing.GraphInterpreterShell.init(ActorGraphInterpreter.scala:594)
at akka.stream.impl.fusing.ActorGraphInterpreter.tryInit(ActorGraphInterpreter.scala:702)
at akka.stream.impl.fusing.ActorGraphInterpreter.preStart(ActorGraphInterpreter.scala:751)
at akka.actor.Actor.aroundPreStart(Actor.scala:548)
at akka.actor.Actor.aroundPreStart$(Actor.scala:548)
at akka.stream.impl.fusing.ActorGraphInterpreter.aroundPreStart(ActorGraphInterpreter.scala:691)
at akka.actor.ActorCell.create(ActorCell.scala:643)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:513)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:535)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:295)
at akka.dispatch.Mailbox.run(Mailbox.scala:230)
at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

someone has the same issue ? the stream compiles perfectly.

Maybe this Stackoverflow article helps.

Junction operations that perform a fan-in (such as Merge) or a fan-out (such as Partition) must be explicitly passed to builder.add

Paul

Hello,

I added a builder for partition et a builder for merge, do I need add a builder for the input of the graph too?