I am actually using Scala but the question is generic to all Rx and streaming frameworks.
My use case is that I have a generated observable (thus cold) and I want multiple consumers to consume the exact same values in parallel, but I expect them to have significantly different throughput.
What I need could be done by broadcasting an observable with replay, but I see that the common policy of replay with a max buffer size is to drop elements from the buffer on overflow (that are then lost for the slowest consumers) instead of back-pressuring the producer. It makes sense if you treat all broadcasted observables as hot, but, in my case, I know that it actually is cold and can be back-pressured.
Is there some way to achieve this in any of the JVM reactive stream compliant frameworks?
Many thanks!