调用ConsumerGroupUpdateCheckPoint接口更新指定消费组消费数据时Shard的checkpoint。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
POST /logstores/{logstore}/consumergroups/{consumerGroup}?type=checkpoint HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
project | String | Host | 否 | ali-test-project |
Project名称。 |
logstore | String | Path | 否 | ali-test-logstore |
Logstore名称。 |
consumerGroup | String | Path | 否 | consumer_group_test |
消费组名称。 |
consumer | String | Query | 否 | consumer_1 |
消费者。 |
forceSuccess | Boolean | Query | 否 | false |
是否强制更新。
|
Array | Body | 否 |
Shard ID。 |
||
shard | Integer | Body | 否 | 0 |
Shard ID。 |
checkpoint | String | Body | 否 | MTUyNDE1NTM3OTM3MzkwODQ5Ng== |
checkpoint值。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
Server | String | nginx |
服务器名称。 |
Content-Type | String | application/json |
返回的响应体的内容格式。 |
Content-Length | String | 0 |
响应内容长度。 |
Connection | String | close |
是否长连接。取值包括:
|
Date | String | Sun, 27 May 2018 08:25:04 GMT |
返回响应的时间。 |
x-log-requestid | String | 5B0A6B60BB6EE39764D458B5 |
服务端产生的标识,该请求的唯一ID。 |
示例
请求示例
POST /logstores/ali-test-logstore/consumergroups/{consumerGroup}?type=checkpoint?consumer=consumer_1&forceSuccess=false HTTP/1.1
Host:ali-test-project.cn-hangzhou.log.aliyuncs.com
Content-Type:application/json
[ {
"shard" : 0,
"checkpoint" : "MTUyNDE1NTM3OTM3MzkwODQ5Ng=="
} ]
正常返回示例
JSON
格式
HTTP/1.1 200 OK
错误码
访问错误中心查看更多错误码。
HttpStatusCode |
ErrorCode |
ErrorMessage |
错误码描述 |
400 |
InvalidShardCheckPoint |
shard checkpoint not encoded by base64. |
checkpoint不是Base64编码,格式错误。 |
404 |
ProjectNotExist |
Project does not exist. |
Project不存在。 |
404 |
LogStoreNotExist |
Logstore does not exist. |
Logstore不存在。 |
404 |
ConsumerGroupNotExist |
consumer group not exist. |
消费组不存在。 |
404 |
ConsumerNotExist |
consumer not exist in the consumer group. |
消费组中不存在该消费者。 |
404 |
ShardNotExist |
shard not exist. |
Shard不存在。 |
500 |
InternalServerError |
Specified Server Error Message. |
内部服务调用错误。 |
更多信息,请参见通用错误码。
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家
阿里云企业补贴进行中: 马上申请
腾讯云限时活动1折起,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠
转转请注明出处:https://www.yunxiaoer.com/162403.html