|
10 | 10 | // |
11 | 11 | // Version 8, introduced in Kafka 3.4, supports -4 as a timestamp to return |
12 | 12 | // the local log start offset (in the context of tiered storage, see KIP-405). |
13 | | -ListOffsetsRequest => key 2, max version 8, flexible v6+ |
| 13 | +// |
| 14 | +// Version 9, introduced in Kafka 3.9, supports -5 as a timestamp to return |
| 15 | +// the latest offset in remote storage. See KIP-1005. |
| 16 | +// |
| 17 | +// Version 10, introduced in Kafka 4.0, adds TimeoutMillis, allowing you to set |
| 18 | +// a timeout when the ListOffsets request triggers a lookup from remote storage. |
| 19 | +// See KIP-1075. |
| 20 | +ListOffsetsRequest => key 2, max version 10, flexible v6+ |
14 | 21 | // ReplicaID is the broker ID to get offsets from. As a Kafka client, use -1. |
15 | 22 | // The consumer replica ID (-1) causes requests to only succeed if issued |
16 | 23 | // against the leader broker. |
@@ -61,10 +68,16 @@ ListOffsetsRequest => key 2, max version 8, flexible v6+ |
61 | 68 | // KIP-405), the new special timestamp -4 returns the local log start |
62 | 69 | // offset. In the context of tiered storage, the earliest local log start |
63 | 70 | // offset is the offset actually available on disk on the broker. |
| 71 | + // |
| 72 | + // If you are talking to Kafka 3.9+ and using request version 9+ (for KIP-1005), |
| 73 | + // the special timestamp -5 returns the latest offset in remote storage. |
64 | 74 | Timestamp: int64 |
65 | 75 | // MaxNumOffsets is the maximum number of offsets to report. |
66 | 76 | // This was removed after v0. |
67 | 77 | MaxNumOffsets: int32(1) // v0-v0 |
| 78 | + // TimeoutMillis is how long to wait for a lookup the offset being looked up |
| 79 | + // is in remote storage. |
| 80 | + TimeoutMillis: int32(30000) // v10+ |
68 | 81 |
|
69 | 82 | // ListOffsetsResponse is returned from a ListOffsetsRequest. |
70 | 83 | ListOffsetsResponse => |
|
0 commit comments