Skip to content

Latest commit

 

History

History

pubsub

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

发布订阅模式

发布订阅模式(Publish-Subscribe Pattern)用于实现多个发布者(Publishers)将消息发送给多个订阅者(Subscribers)的系统。在该模式中,发布者和订阅者之间是解耦的,发布者不直接发送消息给订阅者,而是通过消息通道(Channel)或者中介者(Mediator)来进行消息的传递。这种方式使得系统更加灵活,可以动态地增加或移除发布者和订阅者,同时减少了组件之间的依赖关系。