Skip to content

Commit

Permalink
dekaf: Also update to disable read-back behavior when rewriting offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
jshearer committed Oct 25, 2024
1 parent cc3b486 commit cb3fd03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/dekaf/src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ impl Read {
let stream = client.clone().read_json_lines(
broker::ReadRequest {
// Start reading at least 1 document in the past
offset: std::cmp::max(0, offset - OFFSET_READBACK),
offset: if rewrite_offsets_from.is_some() {
offset
} else {
std::cmp::max(0, offset - OFFSET_READBACK)
},
block: true,
journal: partition.spec.name.clone(),
begin_mod_time: not_before_sec as i64,
Expand Down

0 comments on commit cb3fd03

Please sign in to comment.