I was researching the Java Flux API when I noticed from some tutorials that you can only subscribe to one publisher. Yet, I see a use-case where having multiple publishers to a single subscribe is useful: some sort of a data/message bus.
The only solution I found is encapsulating an array of subscribers and 1 publisher inside the bus.
My question is, which is the correct approach from a reactive point of view to this problem?
I'm interested in solving this by implementing my own Publishers/Subscribers etc. (using the Java 9 java.util.concurrent.Flow
API) This project is for learning purpouses, not for production.