import { default } from "https://deno.land/x/kafkasaur@v0.0.7/src/consumer/batch.ts";
A batch collects messages returned from a single fetch call.
A batch could contain multiple Kafka RecordBatches.
Methods
isEmpty()
With compressed messages, it's possible for the returned messages to have offsets smaller than the starting offset. These messages will be filtered out (i.e. they are not even included in this.messagesWithinOffset) If these are the only messages, the batch will appear as an empty batch.
isEmpty() and isEmptyIncludingFiltered() will always return true if the batch is empty, but this method will only return true if the batch is empty due to log compacted messages.
Returns the lag based on the last offset in the batch (also known as "high")
Returns the lag based on the first offset in the batch