mirror of
https://github.com/crazybber/go-pattern-examples.git
synced 2024-11-22 03:46:03 +03:00
add images for pub/sub pattern & update readme
This commit is contained in:
parent
2eea29f06e
commit
1f493624b5
@ -2,6 +2,10 @@
|
||||
|
||||
发布-订阅是一种消息传递模式,基本设计原则是将消息发布者和提供者分开,常常用于在不同组件之间传递消息。
|
||||
|
||||
它有点类似于观察者行为设计模式,但是发布订阅模式往往要依赖一个中介<通常是各类的消息中间件,消息队列>
|
||||
![图示关系](../../images/pub-sub-pattern-0.png)
|
||||
发布订阅模式往往实现为<消息代理,消息中间件,消息队列>等
|
||||
|
||||
有三个关键组是:消息本身、消息主题、订阅用户。
|
||||
该模式中的三个关键类型:消息本身、消息主题、订阅用户。
|
||||
![图示关系](../../images/pub-sub-pattern-1.png)
|
||||
|
||||
图片来源:[pubsub-pattern.md](https://github.com/imsardine/dev-notes/blob/source/docs/pubsub-pattern.md)
|
||||
|
BIN
images/pub-sub-pattern-0.png
Normal file
BIN
images/pub-sub-pattern-0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
images/pub-sub-pattern-1.png
Normal file
BIN
images/pub-sub-pattern-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user