confluent-kafka-dotnet
Show / Hide Table of Contents

Class WatermarkOffsets

Represents the low and high watermark offsets of a Kafka topic/partition.

Inheritance
object
WatermarkOffsets
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public class WatermarkOffsets
Remarks

You can identify a partition that has not yet been written to by checking if the high watermark equals 0.

Constructors

WatermarkOffsets(Offset, Offset)

Initializes a new instance of the WatermarkOffsets class with the specified offsets.

Declaration
public WatermarkOffsets(Offset low, Offset high)
Parameters
TypeNameDescription
Offsetlow

The offset of the earliest message in the topic/partition. If no messages have been written to the topic, the low watermark offset is set to 0. The low watermark will also be 0 if one message has been written to the partition (with offset 0).

Offsethigh

The high watermark offset, which is the offset of the latest message in the topic/partition available for consumption + 1.

Properties

High

Gets the high watermark offset, which is the offset of the latest message in the topic/partition available for consumption + 1.

Declaration
public Offset High { get; }
Property Value
TypeDescription
Offset

Low

Gets the offset of the earliest message in the topic/partition. If no messages have been written to the topic, the low watermark offset is set to 0. The low watermark will also be 0 if one message has been written to the partition (with offset 0).

Declaration
public Offset Low { get; }
Property Value
TypeDescription
Offset

Methods

ToString()

Returns a string representation of the WatermarkOffsets object.

Declaration
public override string ToString()
Returns
TypeDescription
string

A string representation of the WatermarkOffsets object.

Overrides
object.ToString()
In this article