Through a combination of a multicaster<observable<T>>, and the merge and share operators, one is able to create a dynamic multi-producer, multi-consumer API for observables that can connect or disconnect at any time on either end. (The only limitation is that this can have at most eight producers, see #2012.)
However, this is very inconvenient to set up and get right for something that I would consider a basic building block in a very decoupled system where actors can produce messages and others can choose to consume them.
I think this would be much better expressed through a mechanism that is tailor-made for this, e.g., an MPMC buffer resource with an API similar to the existing SPSC buffer resource.
Through a combination of a
multicaster<observable<T>>, and themergeandshareoperators, one is able to create a dynamic multi-producer, multi-consumer API for observables that can connect or disconnect at any time on either end. (The only limitation is that this can have at most eight producers, see #2012.)However, this is very inconvenient to set up and get right for something that I would consider a basic building block in a very decoupled system where actors can produce messages and others can choose to consume them.
I think this would be much better expressed through a mechanism that is tailor-made for this, e.g., an MPMC buffer resource with an API similar to the existing SPSC buffer resource.