Hi Petr,
Firstly - do not use the io.Source + getLines trick to get lines from a File, it's horribly slow :-)
It's much faster and also takes care of closing the File properly in case of completion or failure.
You'll want to use the parseLines cookbook recipe for the time being for parsing lines:
We already have a built-in lines parser in the works and it will be provided in the next RC of Akka Streams:
Secondly, more generally speaking in cases like these you can broadcast to 2 sinks, one of them being an onComplete sink and then you
can use this sink as the "on completion do this and that" signal.
* Synchronous because it's using blocking API, because non-blocking API is not available on Java 6 which Akka Streams have to support currently. We have a ticket for the async file source
https://github.com/akka/akka/issues/17269 and it will be provided later on (once Akka Streams join Akka 2.4 with requiring Java 8).