Sink.foreachParallel is probably the easiest way to implement writing to a JDBC. Things to keep in mind: set parallel argument to 1 if you need write the elements in the same order as they arrive - usually it shouldn't matter but if you are generating a surrogate primary key using a sequence you may want to have the ids in the same order as the source items. If you don't care about order, set parallel to the maximum number of JVM threads and JDBC connections you want to use for writing at any given time. Choosing an optimal value is very dependent on your particular data & DB setup. It's very important to use a dedicated executionContext for foreachParallel because it's threads are going to be blocked. Using your ActorSystem's dispatcher for this purpose will result in extremely bad performance.
Cheers, Rafał W dniu czwartek, 9 marca 2017 11:16:31 UTC+1 użytkownik DEEPAK GUPTA napisał: > > How to make Akka stream to write on Orcacle Database using Java. Example > will help A lot. > Thanks in Advance.. > -- >>>>>>>>>> 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.
