command
module
Version:
v0.0.0-...-6c253c0
Opens a new window with list of versions in this module.
Published: Aug 3, 2020
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
go-mds
A reliable message service system developed with golang
消息发送流程
- 主动方发送预消息(消息状态为"待确认")
- 主动方根据(1)返回的结果执行响应的业务操作
- 发送业务处理结果,业务操作与消息确认保证在一个原子操作里面。
- 消息中间件根据业务结果, 更新("待发送"--> "发送中")/删除对应的消息
- 消息中间件监听并接收待发送状态的消息
消息服务系统
- 存储预发送消息
- 确认并发送消息
- 查询状态确认超时的消息
- 确认消息已被成功消息
- 查询消费确认超时的消息
- 删除消息
- 消息状态确认子系统(crontab)
- 消息恢复子系统
Api
-
消息预发送
POST http://127.0.0.1:3000/api/v1/message/create
{
"messageBody": "{'a': 'this is a test'}",
"messageQueue": "test",
"messageId": "43296482634873",
"extra": ""
}
说明: messageBody为json数据, messageId指定消息发送的唯一Id
>
-
消息发送确认
POST http://127.0.0.1:3000/api/v1/message/confirm
{
"messageId": "324324234"
}
ToDo
- 确认超时的消息需要被删除
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
utils
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.