![Building Serverless Microservices in Python](https://wfqqreader-1252317822.image.myqcloud.com/cover/764/36698764/b_36698764.jpg)
上QQ阅读APP看书,第一时间看更新
Many-to-many communication microservice patterns
For many-to-many communication, we use publish/subscribe, which is a messaging pattern. This is where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers; rather, the receiver needs to subscribe to the messages. It's a highly scalable pattern as the two are decoupled:
![](https://epubservercos.yuewen.com/B0DCF8/19470380508818406/epubprivate/OEBPS/Images/58541d05-3ffb-4cb5-a28f-8c9cd952e78e.png?sign=1739290764-uXDAbgAwFV02tMvPgUohQjzfhMXVFZhN-0-a93f35f2fb0d1cf7fe3ef4310725d53a)
Asynchronous messaging allows a service to consume and act upon the events, and is a very scalable pattern as you have decoupled two services: the publisher and the subscriber.