doc-exports/docs/dms/umn/kafka-ug-0014.html
Chen, Junjie dd8a3a658b DMS UMN Initial Version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2022-12-08 00:33:11 +00:00

51 lines
6.6 KiB
HTML

<a name="kafka-ug-0014"></a><a name="kafka-ug-0014"></a>
<h1 class="topictitle1">Resetting the Consumer Offset</h1>
<div id="body0000001241621406"><p id="kafka-ug-0014__p11638355589">Resetting the consumer offset is to change the retrieval position of a consumer.</p>
<div class="notice" id="kafka-ug-0014__note228194010371"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="kafka-ug-0014__p1528154073712">Messages may be retrieved more than once after the offset is reset. Exercise caution when performing this operation.</p>
</div></div>
<div class="section" id="kafka-ug-0014__section8241820195010"><h4 class="sectiontitle">Prerequisites</h4><p id="kafka-ug-0014__p6328625145014">The consumer offset cannot be reset on the fly. You must first stop retrieval of the desired consumer group.</p>
</div>
<div class="section" id="kafka-ug-0014__section149419481115"><h4 class="sectiontitle">Procedure</h4><ol id="kafka-ug-0014__ol1694563316919"><li id="kafka-ug-0014__li9945143318917"><span>Log in to the management console.</span></li><li id="kafka-ug-0014__li994563315915"><span>Click <span><img id="kafka-ug-0014__image1363965111107" src="en-us_image_0143929918.png"></span> in the upper left corner to select a region.</span><p><div class="note" id="kafka-ug-0014__note394516330912"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="kafka-ug-0014__p1694512333917">Select the region where your Kafka instance is located.</p>
</div></div>
</p></li><li id="kafka-ug-0014__li13196447165814"><span>Click <strong id="kafka-ug-0014__b187677460595717">Service List</strong> and choose <strong id="kafka-ug-0014__b146841523695717">Application</strong> &gt; <strong id="kafka-ug-0014__b160124893495717">Distributed Message Service</strong>. The Kafka instance list is displayed.</span></li><li id="kafka-ug-0014__li494514336914"><span>Click the desired Kafka instance to view the instance details.</span></li><li id="kafka-ug-0014__li1694510331918"><span>In the navigation pane, choose the <strong id="kafka-ug-0014__b1276914312567">Consumer Groups</strong> tab.</span></li><li id="kafka-ug-0014__li19451233495"><span>Click the name of the desired consumer group.</span></li><li id="kafka-ug-0014__li1149819404"><span>On the <strong id="kafka-ug-0014__b10592242182315">Consumer Offset</strong> tab page, you can perform the following operations:</span><p><ul id="kafka-ug-0014__ul2584134041616"><li id="kafka-ug-0014__li11584124011165">To reset the consumer offset of all partitions of a topic, click <strong id="kafka-ug-0014__b11297185202512">Reset Consumer Offset</strong> in the row containing the desired topic.</li><li id="kafka-ug-0014__li7736134315194">To reset the consumer offset of a single partition of a topic, click <strong id="kafka-ug-0014__b1522941814259">Reset Consumer Offset</strong> in the row containing the desired partition.</li></ul>
</p></li><li id="kafka-ug-0014__li1950985117152"><span>In the displayed <strong id="kafka-ug-0014__b661694720253">Reset Consumer Offset</strong> dialog box, set the parameters by referring to <a href="#kafka-ug-0014__table13921162119239">Table 1</a>.</span><p>
<div class="tablenoborder"><a name="kafka-ug-0014__table13921162119239"></a><a name="table13921162119239"></a><table cellpadding="4" cellspacing="0" summary="" id="kafka-ug-0014__table13921162119239" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for resetting the consumer offset</caption><thead align="left"><tr id="kafka-ug-0014__row892110213237"><th align="left" class="cellrowborder" valign="top" width="23.21%" id="mcps1.3.4.2.8.2.1.2.3.1.1"><p id="kafka-ug-0014__p1092212214238">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="76.79%" id="mcps1.3.4.2.8.2.1.2.3.1.2"><p id="kafka-ug-0014__p1922021192315">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kafka-ug-0014__row2092252117235"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.4.2.8.2.1.2.3.1.1 "><p id="kafka-ug-0014__p49221721172316">Reset By</p>
</td>
<td class="cellrowborder" valign="top" width="76.79%" headers="mcps1.3.4.2.8.2.1.2.3.1.2 "><p id="kafka-ug-0014__p1692242118231">You can reset an offset by:</p>
<ul id="kafka-ug-0014__ul84171314202711"><li id="kafka-ug-0014__li18417161432717">Time: Reset the offset to the specified time.</li><li id="kafka-ug-0014__li114421818162718">Offset: Reset the offset to the specified position.</li></ul>
</td>
</tr>
<tr id="kafka-ug-0014__row109221921102310"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.4.2.8.2.1.2.3.1.1 "><p id="kafka-ug-0014__p129222021132318">Time</p>
</td>
<td class="cellrowborder" valign="top" width="76.79%" headers="mcps1.3.4.2.8.2.1.2.3.1.2 "><p id="kafka-ug-0014__p492212215230">Set this parameter if <strong id="kafka-ug-0014__b761915227272">Reset By</strong> is set to <strong id="kafka-ug-0014__b20743262275">Time</strong>.</p>
<p id="kafka-ug-0014__p1686610483293">Select a time point. After the reset is complete, retrieval starts from this time point.</p>
<ul id="kafka-ug-0014__ul1434561314174"><li id="kafka-ug-0014__li1634591371716"><strong id="kafka-ug-0014__b4521852142819">Earliest</strong>: earliest offset</li><li id="kafka-ug-0014__li1168912199177"><strong id="kafka-ug-0014__b15859831162912">Custom Time Range</strong>: a custom time point</li><li id="kafka-ug-0014__li292318222176"><strong id="kafka-ug-0014__b115902295295">Latest</strong>: latest offset</li></ul>
</td>
</tr>
<tr id="kafka-ug-0014__row17922132119237"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.4.2.8.2.1.2.3.1.1 "><p id="kafka-ug-0014__p092292119237">Offset</p>
</td>
<td class="cellrowborder" valign="top" width="76.79%" headers="mcps1.3.4.2.8.2.1.2.3.1.2 "><p id="kafka-ug-0014__p4922122113232">Set this parameter if <strong id="kafka-ug-0014__b15453943172915">Reset By</strong> is set to <strong id="kafka-ug-0014__b64539435294">Offset</strong>.</p>
<p id="kafka-ug-0014__p7109457133219">Enter an offset, which is greater than or equal to 0. After the reset is complete, retrieval starts from this offset.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="kafka-ug-0014__li3479141412313"><span>Click <strong id="kafka-ug-0014__b927216403017">OK</strong>.</span></li><li id="kafka-ug-0014__li1987375812215"><span>Click <strong id="kafka-ug-0014__b378132616309">Yes</strong> in the confirmation dialog box. The consumer offset is reset.</span></li></ol>
</div>
<p id="kafka-ug-0014__p8060118"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="kafka-ug-0011.html">Managing Consumer Groups</a></div>
</div>
</div>