TsgcWSPClient_KafkaMethods › GetCommittedOffset

GetCommittedOffset Method

Returns the last committed offset for the current consumer group on a topic/partition, or -1 if none.

Syntax

function GetCommittedOffset(const aTopic: string; aPartition: Integer): Int64;

Parameters

Remarks

Returns the last offset committed by the current consumer group for the given topic/partition. If the consumer group has never committed an offset for that topic/partition, the method returns -1.

Example

vOff := oKafka.GetCommittedOffset('my-topic', 0);
if vOff = -1 then
  // no committed offset for this consumer group

Back to Methods