This is a beginner's question. I am streaming back the output of several processes back to client, and I want to store each stream to a separate file.
So what I want is (large letter indicates the end of the nested stream)
S: -a-a-a-b-b-a-A-c-b-B-c-c-...-d--C...D-e--...-z-E-z--z--...
R: a-a-a-----a-A (complete)
b-b-------b-B (complete)
c-----c-c--------C (complete)
d------D (complete)
e--------E (complete)
.
.
.
(end many more nested streams coming)
.
So I want something like a dynamic factory of Observables. Similar to using(), but as I understand using() creates Observables that exist as long as the original Observable, whereas I want to complete and close file every time nested stream completes.
IMPORTANT - I don't want to buffer in memory, as these are very long streams (output of long running processes). So I would like to avoid buffer(), groupBy().