kafka接口文档
2018-11-08 本文已影响0人
范得郭
生产接口
- http://localhost:5000/pro
- uid为空字符串、name为任务名、topic主题、msg执行任务
{
"uid":"",
"name":"test-name",
"topic":"test-topice",
"msg":"uid-test12345"
}
- kafka通道内容
{
"uid": "d486676dfd374c00996311bcdc5d54a0",
"topic": "test-topice",
"msg": "uid-test12345",
"name": "test-name"
}
接收生产直接订阅kafka主题
生成执行任务状态
{
"uid":"d486676dfd374c00996311bcdc5d54a0",
"name":"test-name",
"topic":"return_status",
"msg":"create_"
}
- 状态写入数据库、返回数据
{
"uid": "d486676dfd374c00996311bcdc5d54a0",
"topic": "return_status",
"msg": "create_",
"name": "test-name"
}
通过接口获取状态 http://localhost:5000/status
{
"uid":"d486676dfd374c00996311bcdc5d54a0",
"name":"test-name",
"topic":"test-topice",
"msg":"uid-test111"
}
- return
{"uid":"d486676dfd374c00996311bcdc5d54a0","status":"create_"}