Search code examples
scalaakkaakka-stream

Akka Streams - Split incoming sources data based on some predicate


I'm newbie in Akka Streams framework and I want to know the possibilities to solve my problem with aim of Akka Streams. Imagine here is a problem:

  1. Several large iteratee sources, e.g. 3-4 large files with probably the same data;
  2. Each file needs to be processed: parsed, transformed, average value calculated;
  3. Data from file should be partitioned by some predicate and then processed by partition. Partition predicate can be dynamic from run to run;
  4. Every partition should be saved to another file or stream, or so.

Is it possible to solve with Akka Streams?


Solution

  • Have you considered using Partition?