I’m trying to do the following:
Source.repeat(ByteString("Hello World!")) .filter(e => myFilter(e)) .idleTimeout(5 seconds) .via(Compression.gzip()) .runWith(FileIO.fromPath(file))
Since my source is running indefinitely, I put the idleTimeout after the filter. I want my stream to stop and complete my stream if there’s no new elements after the filter within a certain amount of time. The idleTimeout is running a `TimeoutException as expected but before that there’s a AbruptIOTerminationException
This will result in a corrupted file and not properly closed gzip file. Am I using the correct built-in stage
for this or is there another stage I need to be aware of ?