title: Akka Stream - Parallel runnable graphs
body: <p>Need suggestion, I need to run parallel multiple source graphs, for example I have created this sample code where I am creating 10 graphs and running them parallel. </p>
  
  <p>Is this right approach or should I create multiple source inside a graph and run them parallel in one graph?</p>
  
  <pre><code>def createGraph(start: Int, end: Int, name: String) = {
    RunnableGraph.fromGraph(GraphDSL.create() {
      implicit builder =&gt;
        import GraphDSL.Implicits._
        val s = Source(start to end)
        val f = Flow[Int].map[String](x =&gt; x.toString)
        val sink = Sink.foreach[String](x =&gt; println(name + ":" + x))
  
        val t = builder.add(s)
  
        val flow1 = builder.add(f)
  
        t ~&gt; flow1 ~&gt; sink
  
        ClosedShape
    })
  }
  
  
  (1 to 10).map(x =&gt; createGraph(x, x + 10, "g" + x)).map(_.run())
  </code></pre>
  
  <p>Thanks
  Arun</p>