Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenhao
hel-developer-guide
Commits
69ff5dd4
Commit
69ff5dd4
authored
Jul 27, 2017
by
midKingKing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates 后端开发/消息机制.md
Auto commit by GitBook Editor
parent
cac2cfd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
queue.png
assets/queue.png
+0
-0
消息机制.md
后端开发/消息机制.md
+8
-4
No files found.
assets/queue.png
0 → 100644
View file @
69ff5dd4
22.5 KB
后端开发/消息机制.md
View file @
69ff5dd4
...
...
@@ -22,15 +22,19 @@ RabbitMQ 是实现 AMQP(高级消息队列协议)的消息中间件的一种
### 2.1 定义交换机
在接口管理的消息队列定义模块中,首先进行交换机的定义,界面如图:
在接口管理的消息队列定义模块中,首先进行交换机的定义,界面如图:
!
[](
/assets/exchange.png
)
注意:
![](
/assets/exchange.png
)
交换机名称不可以重复定义,一个交换机可以对应多个队列
### 2.2 定义队列和路由键
交换机类型可以分为
**direct\(唯一模式\),topic\(主题模式\),fanout\(广播模式\),**
rabbitmq会根据你的交换机类型和定义的路由键,完成消息的转发
**。**
持久化(durable):交换机在服务关闭后,清除与否
定义完交换机后,你还需要定义你的队列和相应的匹配模式(既路由键)界面如图:
自动删除(auto-delete):当交换机没有相应的队列匹配时,删除与否
### 2.2 定义队列和路由键
定义完交换机后,你还需要定义你的队列和相应的匹配模式(既路由键)界面如图:!
[](
/assets/queue.png
)
关键点:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment