Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1367

Write to file from endless stream

$
0
0

Heys guys,

I have a endless streams (a consumer from a queue), that append each element to a file (file path depends on meta data).

source.via(business()).via(saveToFile()).via(business())

Of course, I could write for each a element a Flow, but thats quite slow approach, right?

Source.single(elem).via(toByteString()).runWith(FileIO.toPath(...),system)

Is there a faster solution to append these elements to a file?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1367

Trending Articles