Skip to content

Commit

Permalink
doc: warning for timestamp based offset querying
Browse files Browse the repository at this point in the history
  • Loading branch information
fMeow committed Nov 14, 2024
1 parent 6b7ba50 commit 099ecb9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/client/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ pub enum Compression {
}

/// Which type of offset should be requested by [`PartitionClient::get_offset`].
///
/// # Timestamp-based Queries
/// In theory the Kafka API would also support querying an offset based on a timestamp, but the behavior seems to be
/// semi-defined, unintuitive (even within Apache Kafka) and inconsistent between Apache Kafka and Redpanda. So we
/// decided to NOT expose this option.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OffsetAt {
/// Earliest existing record.
Expand All @@ -99,6 +94,10 @@ pub enum OffsetAt {
Latest,

/// Timestamp
///
/// The Kafka API supports querying an offset based on a timestamp, but the behavior seems to be
/// semi-defined, unintuitive (even within Apache Kafka) and inconsistent between Apache Kafka and Redpanda. Mostly it
/// offers timestamp based querying with millisecond precision.
Timestamp(DateTime<Utc>),
}

Expand Down

0 comments on commit 099ecb9

Please sign in to comment.