Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/kafkasaur/src/consumer/batch.ts>default

A Kafka Client for Deno!
Latest
class default
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.

Constructors

new
default(
topic: any,
fetchedOffset: any,
partitionData: any,
)

Properties

fetchedOffset: any
highWatermark: any
messages: any
messagesWithinOffset: any
partition: any
rawMessages: any
topic: any

Methods

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