View definition


Defined in


MarkOffset marks the provided offset, alongside a metadata string that represents the state of the partition consumer at that point in time. The metadata string can be used by another consumer to restore that state, so it can resume consumption.

To follow upstream conventions, you are expected to mark the offset of the next message to read, not the last message read. Thus, when calling `MarkOffset` you should typically add one to the offset of the last consumed message.

Note: calling MarkOffset does not necessarily commit the offset to the backend store immediately for efficiency reasons, and it may never be committed if your application crashes. This means that you may end up processing the same message twice, and your processing should ideally be idempotent.

MarkOffset is referenced in 2 repositories