-
Notifications
You must be signed in to change notification settings - Fork 11
consumer
phachon edited this page Jun 6, 2018
·
3 revisions
- Path: /consumer/add?
- Request: HTTP
- Method: POST
- Auth Token: true -> How to pass token?
- Params:
name | type | required | description | comment |
---|---|---|---|---|
name | string | true | message name | |
comment | string | true | this consumer comment | |
url | string | true | consumer url | not empty |
route_key | string | false | rabbitmq consumer route_key | |
check_code | string | true | When the request consumer the url, whether to check the url's return status code | "1" true "0" false |
code | string | true | If you need to check code, please input the code | If code check error, the publish message consumer failed |
timeout | string | true | request the consumer url timeout |
- Success:
{
"code": 1,
"message": "success",
"data": {}
}
- Failed:
{
"code": 0,
"message": "error",
"data": {}
}
- Path: /consumer/update?
- Request: HTTP
- Method: POST
- Auth Token: true -> How to pass token?
- Params:
name | type | required | description | comment |
---|---|---|---|---|
consumer_id | string | true | consumer id | |
name | string | true | message name | |
comment | string | true | this consumer comment | |
url | string | true | consumer url | not empty |
route_key | string | false | rabbitmq consumer route_key | |
check_code | string | true | When the request consumer the url, whether to check the url's return status code | "1" true "0" false |
code | string | true | If you need to check code, please input the code | If code check error, the publish message consumer failed |
timeout | string | true | request the consumer url timeout |
- Success:
{
"code": 1,
"message": "success",
"data": {}
}
- Failed:
{
"code": 0,
"message": "error",
"data": {}
}
- Path: /consumer/delete?
- Request: HTTP
- Method: GET
- Auth Token: true -> How to pass token?
- Params:
name | type | required | description | comment |
---|---|---|---|---|
consumer_id | string | true | consumer id | |
name | string | true | message name |
- Success:
{
"code": 1,
"message": "success",
"data": {}
}
- Failed:
{
"code": 0,
"message": "error",
"data": {}
}
- Path: /consumer/status?
- Request: HTTP
- Method: GET
- Auth Token: true -> How to pass token?
- Params:
name | type | required | description | comment |
---|---|---|---|---|
consumer_id | string | true | consumer id | |
name | string | true | message name |
- Success:
{
"code": 1,
"message": "success",
"data": {
"name": "test", // message name
"consumer_id": "7f07144b-c9f4-452e-5c2c-23f78cf01b42", // consumer id
"status": 1, // 0 this consumer run stop;1 this consumer run normally
"last_time": "1514363567", // this consumer run last time
"count": "200", // count of messages rabbitmq not awaiting acknowledgment
}
}
- Failed:
{
"code": 0,
"message": "error",
"data": []
}
- Path: /consumer/getConsumerById?
- Request: HTTP
- Method: GET
- Auth Token: true -> How to pass token?
- Params:
name | type | required | description | comment |
---|---|---|---|---|
consumer_id | string | true | consumer id | |
name | string | true | message name |
- Success:
{
"code": 1,
"message": "success",
"data": {
"id": "48b441f9-a54b-487c-4ec5-3d81d3282f2a",
"url": "http://127.0.0.1:80/test222.php",
"route_key": "test222",
"timeout": 2000,
"code": 200,
"check_code": true,
"comment": ""
}
}
- Failed:
{
"code": 0,
"message": "error",
"data": {}
}