Skip to content

Commit

Permalink
fix(patch): [sc-13174] use eof offset without increment (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
blindspotbounty authored Aug 29, 2024
1 parent 81ae1f9 commit b2e3d1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Kafka/RDKafka/RDKafkaClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public final class RDKafkaClient: Sendable {
changesList.setOffset(
topic: message.topic,
partition: message.partition,
offset: .init(rawValue: message.offset.rawValue + 1)
offset: message.eof ? message.offset : .init(rawValue: message.offset.rawValue + 1)
)

let error = changesList.withListPointer { listPointer in
Expand Down Expand Up @@ -714,7 +714,7 @@ public final class RDKafkaClient: Sendable {
changesList.setOffset(
topic: message.topic,
partition: message.partition,
offset: .init(rawValue: message.offset.rawValue + 1)
offset: message.eof ? message.offset : .init(rawValue: message.offset.rawValue + 1)
)

// Unretained pass because the reference that librdkafka holds to capturedClosure
Expand Down

0 comments on commit b2e3d1f

Please sign in to comment.