public class ModifyGroupOffsetsRequest extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| ModifyGroupOffsetsRequest() | 
| ModifyGroupOffsetsRequest(ModifyGroupOffsetsRequest source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getGroup()Get 消费分组名称,可通过[DescribeConsumerGroup](https://cloud.tencent.com/document/product/597/40841)接口获取 | 
| String | getInstanceId()Get ckafka集群实例Id,可通过[DescribeInstances](https://cloud.tencent.com/document/product/597/40835)接口获取 | 
| Long | getOffset()Get 需要重新设置的offset位置。当strategy为2,必须包含该字段。 | 
| Long[] | getPartitions()Get 需要重新设置的partition的列表,如果没有指定Topics参数。则重置全部topics的对应的Partition列表里的partition。指定Topics时则重置指定的topic列表的对应的Partitions列表的partition。 | 
| Long | getShift()Get 当strategy为0时,必须包含该字段,可以大于零代表会把offset向后移动shift条,小于零则将offset向前回溯shift条数。正确重置后新的offset应该是(old_offset + shift),需要注意的是如果新的offset小于partition的earliest则会设置为earliest,如果大于partition 的latest则会设置为latest | 
| Long | getShiftTimestamp()Get 单位ms。当strategy为1时,必须包含该字段,其中-2表示重置offset到最开始的位置,-1表示重置到最新的位置(相当于清空),其它值则代表指定的时间,会获取topic中指定时间的offset然后进行重置,需要注意的是,如果指定的时间不存在消息,则获取最末尾的offset。 | 
| Long | getStrategy()Get 重置offset的策略,入参含义 0. | 
| String[] | getTopics()Get 需要重置的主题名列表 | 
| void | setGroup(String Group)Set 消费分组名称,可通过[DescribeConsumerGroup](https://cloud.tencent.com/document/product/597/40841)接口获取 | 
| void | setInstanceId(String InstanceId)Set ckafka集群实例Id,可通过[DescribeInstances](https://cloud.tencent.com/document/product/597/40835)接口获取 | 
| void | setOffset(Long Offset)Set 需要重新设置的offset位置。当strategy为2,必须包含该字段。 | 
| void | setPartitions(Long[] Partitions)Set 需要重新设置的partition的列表,如果没有指定Topics参数。则重置全部topics的对应的Partition列表里的partition。指定Topics时则重置指定的topic列表的对应的Partitions列表的partition。 | 
| void | setShift(Long Shift)Set 当strategy为0时,必须包含该字段,可以大于零代表会把offset向后移动shift条,小于零则将offset向前回溯shift条数。正确重置后新的offset应该是(old_offset + shift),需要注意的是如果新的offset小于partition的earliest则会设置为earliest,如果大于partition 的latest则会设置为latest | 
| void | setShiftTimestamp(Long ShiftTimestamp)Set 单位ms。当strategy为1时,必须包含该字段,其中-2表示重置offset到最开始的位置,-1表示重置到最新的位置(相当于清空),其它值则代表指定的时间,会获取topic中指定时间的offset然后进行重置,需要注意的是,如果指定的时间不存在消息,则获取最末尾的offset。 | 
| void | setStrategy(Long Strategy)Set 重置offset的策略,入参含义 0. | 
| void | setTopics(String[] Topics)Set 需要重置的主题名列表 | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic ModifyGroupOffsetsRequest()
public ModifyGroupOffsetsRequest(ModifyGroupOffsetsRequest source)
public String getInstanceId()
public void setInstanceId(String InstanceId)
InstanceId - ckafka集群实例Id,可通过[DescribeInstances](https://cloud.tencent.com/document/product/597/40835)接口获取public String getGroup()
public void setGroup(String Group)
Group - 消费分组名称,可通过[DescribeConsumerGroup](https://cloud.tencent.com/document/product/597/40841)接口获取public Long getStrategy()
public void setStrategy(Long Strategy)
Strategy - 重置offset的策略,入参含义 0. 对齐shift-by参数,代表把offset向前或向后移动shift条 1. 对齐参考(by-duration,to-datetime,to-earliest,to-latest),代表把offset移动到指定timestamp的位置 2. 对齐参考(to-offset),代表把offset移动到指定的offset位置public String[] getTopics()
public void setTopics(String[] Topics)
Topics - 需要重置的主题名列表public Long getShift()
public void setShift(Long Shift)
Shift - 当strategy为0时,必须包含该字段,可以大于零代表会把offset向后移动shift条,小于零则将offset向前回溯shift条数。正确重置后新的offset应该是(old_offset + shift),需要注意的是如果新的offset小于partition的earliest则会设置为earliest,如果大于partition 的latest则会设置为latestpublic Long getShiftTimestamp()
public void setShiftTimestamp(Long ShiftTimestamp)
ShiftTimestamp - 单位ms。当strategy为1时,必须包含该字段,其中-2表示重置offset到最开始的位置,-1表示重置到最新的位置(相当于清空),其它值则代表指定的时间,会获取topic中指定时间的offset然后进行重置,需要注意的是,如果指定的时间不存在消息,则获取最末尾的offset。public Long getOffset()
public void setOffset(Long Offset)
Offset - 需要重新设置的offset位置。当strategy为2,必须包含该字段。public Long[] getPartitions()
public void setPartitions(Long[] Partitions)
Partitions - 需要重新设置的partition的列表,如果没有指定Topics参数。则重置全部topics的对应的Partition列表里的partition。指定Topics时则重置指定的topic列表的对应的Partitions列表的partition。Copyright © 2025. All rights reserved.