Hi Michael,
leaving aside the API for a moment, the question is how the streams should behave. The actual live streams are not immutable but are running things that need to receive data from the original request and send this data out with another request. (I haven't completely understood in which way you want to "split" the source, broadcasting seems to hint that you are going to duplicate data and maybe filter afterwards? It may not matter at this point.)
Let's assume you want to duplicate the stream. How should the duplicated streams behave wrt backpressure when they are actually consumed? The simplest strategy is to assume that you want them to backpressure together, i.e. the slower consumer will set the speed for both of them and the two "stream pointers" only differ as far as the bounded buffers after the broadcast allow. Is that what you are after?
So far for the theoretical operation of the streams. The problem with the API is, that the FlowGraph API requires that the whole graph is materialized together. This means that you cannot possibly return two separate unmaterialized Sources from a graph building operation which is what you need for creating two HttpEntities. One workaround could be to wire the two outputs to two `Sink.publishers` during graph building, and then directly run the graph to obtain two publishers which you then need to wrap into two sources which you can put into two new requests. This works because PublisherSinks can already be materialized on their sink side while still being waiting for a subscriber on the Publisher side. In any case, processing will only start when both sources are running (aside from buffers already filling up before that).
Does that make sense?
If you actually meant splitting the stream by some criteria, i.e. you will first receive data for creating the first request and afterwards for creating the second request there may another solution where you try to create a `Flow[ByteString, HttpRequest]` and feed that into something that actually runs the requests. The challenging thing here is that you need to create an intermediate operation `Flow[ByteString, Source[ByteString]]` which can only be done using groupBy, splitAfter, or splitWhen combinators which, however, cannot be stateful, so you may need some boilerplate to get that scheme implemented.
Cheers,
Johannes