Stream records from DataBase using Akka Stream

Viewed 2439

I have a system using Akka which currently handles incoming streaming data over message queues. When a record arrives then it is processed, mq is acked and record is passed on for further handling within the system.

Now I would like to add support for using DBs as input.
What would be a way to go for the input source to be able to handle DB (should stream in > 100M records at the pace that the receiver can handle - so I presume reactive/akka-streams?)?

2 Answers

I find Alpakka documentation to be excellent and a much easier way to work with reactive-streams than than the Java Publisher interface.

The Alpakka project is an open source initiative to implement stream-aware, reactive, integration pipelines for Java and Scala. It is built on top of Akka Streams, and has been designed from the ground up to understand streaming natively and provide a DSL for reactive and stream-oriented programming, with built-in support for backpressure

Document for Alpakka with Slick: https://doc.akka.io/docs/alpakka/current/slick.html

Alpakka Github: https://github.com/akka/alpakka

Related