kafka-protocol-rs icon indicating copy to clipboard operation
kafka-protocol-rs copied to clipboard

Need help with (offset, sequence) of Record.

Open tuyennguyentech opened this issue 7 months ago • 1 comments

Can anyone explain for me the meaning of offset and sequence fields of Record struct pls. I found that when encode a Vec<Record>. It only produce successfully if offset increases one by one from 0 and sequence can increase one by one from arbitrary number.

tuyennguyentech avatar May 03 '25 05:05 tuyennguyentech

As noted on field's comments: offset:

Message offset within a partition.

It's about order in partition.

sequence:

Sequence identifier used for idempotent delivery.

Record will not be duplicated if same identifier was already delivered.

WShad avatar May 11 '25 14:05 WShad