Title here
Summary here
FanOut is a component that receives messages from a topic and passes them to all subscribers. In effect, messages are “multiplied”.
A typical use case for using FanOut is having one external subscription and multiple workers inside the process.
Full source: github.com/ThreeDotsLabs/watermill/pubsub/gochannel/fanout.go
You need to call AddSubscription method for all topics that you want to listen to. This needs to be done before starting the FanOut.
Full source: github.com/ThreeDotsLabs/watermill/pubsub/gochannel/fanout.go
Full source: github.com/ThreeDotsLabs/watermill/pubsub/gochannel/fanout.go
Then, use it as any other message.Subscriber
.