public class OffsetSpec extends Object
KafkaAdminClient.listOffsets(Map, ListOffsetsOptions)| Modifier and Type | Class and Description |
|---|---|
static class | OffsetSpec.EarliestSpec |
static class | OffsetSpec.LatestSpec |
static class | OffsetSpec.MaxTimestampSpec |
static class | OffsetSpec.TimestampSpec |
| Constructor and Description |
|---|
OffsetSpec() |
| Modifier and Type | Method and Description |
|---|---|
static OffsetSpec | earliest()Used to retrieve the earliest offset of a partition |
static OffsetSpec | forTimestamp(long timestamp)Used to retrieve the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition |
static OffsetSpec | latest()Used to retrieve the latest offset of a partition |
static OffsetSpec | maxTimestamp()Used to retrieve the offset with the largest timestamp of a partition as message timestamps can be specified client side this may not match the log end offset returned by LatestSpec |
public static OffsetSpec latest()
public static OffsetSpec earliest()
public static OffsetSpec forTimestamp(long timestamp)
timestamp - in millisecondspublic static OffsetSpec maxTimestamp()