justforfunc
justforfunc copied to clipboard
Fanout channel to multiple channels
Would be great to see a video on a performant way of taking one channel of events and then fanning those events from that channel to n channels.
Obviously would be important to cover how to gracefully handle the shutdown of those channels without losing a event that is in flight.
Something like the following
So each message sent to the center is replicated and sent to each one of the consumers below?
@campoy Yes exactly that.
Edit: I guess in a way it's the reverse of the merge channels example you did.
@aranw he does this in his trace episode when he tries the "worker" approach.
https://youtu.be/ySy3sR1LFCQ?t=1450