shopex.queue.write(向队列写数据)

公共参数

请求地址:
环境 HTTP请求地址 HTTPS请求地址
正式环境 http://apigateway.shopex.cn/router https://apigateway.shopex.cn/router
沙箱环境 xx xx
公共请求参数:
名称 类型 是否必须 描述
method String 方法名
app_key String app_key
sign_time String 签名时间
sign String 签名

请求参数

名称 是否必须 类型 示例值 字段描述
topic string 队列名字
data string 写入的数据
key string 数据key

响应参数

字段 类型 示例值 字段描述
  • ecode0number
  • emsg成功string
  • result成功返回的数据,失败则无值object
    • partition消息分区1number
    • message_id消息id100number

响应示例

{
  "ecode": "0",
  "emsg": "成功",
  "result": {
    "partition": "1",
    "message_id": "100"
  }
}

异常返回

错误码 错误描述

API工具

shopex.queue.read(读取队列)

公共参数

请求地址:
环境 HTTP请求地址 HTTPS请求地址
正式环境 http://apigateway.shopex.cn/router https://apigateway.shopex.cn/router
沙箱环境 xx xx
公共请求参数:
名称 类型 是否必须 描述
method String 方法名
app_key String app_key
sign_time String 签名时间
sign String 签名

请求参数

名称 是否必须 类型 示例值 字段描述
topic string 队列名字
drop string true (不再支持drop=false)默认取走就删除
num string 1 读取数量

响应参数

字段 类型 示例值 字段描述
  • ecod0number
  • emsg成功string
  • result成功返回的数据,失败则无值object
    • num读取的消息数量1number
    • data读取的消息内容array
      • 0object
        • data消息内容teststring
        • msg_queue队列名字queuestring
        • message_id消息id,需要使用该id做消息确认number
        • partition消息分区number

响应示例

{
  "ecod": "0",
  "emsg": "成功",
  "result": {
    "num": "1",
    "data": [
      {
        "data": "test",
        "msg_queue": "queue",
        "message_id": "",
        "partition": ""
      }
    ]
  }
}

异常返回

错误码 错误描述

API工具

shopex.queue.msgack(消息确认接口)

公共参数

请求地址:
环境 HTTP请求地址 HTTPS请求地址
正式环境 http://apigateway.shopex.cn/router https://apigateway.shopex.cn/router
沙箱环境 xx xx
公共请求参数:
名称 类型 是否必须 描述
method String 方法名
app_key String app_key
sign_time String 签名时间
sign String 签名

请求参数

名称 是否必须 类型 示例值 字段描述
topic string 队列名字
message_id string 读取消息时候返回的消息id
partition string 读取消息时候返回的partition

响应参数

字段 类型 示例值 字段描述
  • ecode错误码0number
  • emsg错误消息成功string
  • result成功返回的数据object

响应示例

{
  "ecode": "0",
  "emsg": "成功",
  "result": {}
}

异常返回

错误码 错误描述

API工具