This returns an AsyncIterable
.
Usage:
const stream = await consumer.getIterator(Offset.FromBeginning())
for await (const next of stream) {
console.log(next)
}
Optional
offset: OffsetFetches events from a particular offset in the consumer's partition
A "fetch" is one of the two ways to consume events in Fluvio. It is a batch request for records from a particular offset in the partition.
You specify the position of records to retrieve using an Offset, and receive the events as a list of records.
Optional
offset: OffsetDescribes the location of an event stored in a Fluvio partition
Static
create
Partition Consumer
Overview
An interface for consuming events from a particular partition
There are two ways to consume events: by "fetching" events and by "streaming" events. Fetching involves specifying a range of events that you want to consume via their Offset.
A fetch is a sort of one-time batch operation: you'll receive all of the events in your range all at once.
When you consume events via Streaming, you specify a starting Offset and receive an object that will continuously yield new events as they arrive.
Example Construction
Do not call this constructor manually, instead use the method below:
This class constructor is used internally by the Fluvio client to provision a topic producer.
The
inner
object is a private object that is the native module created by the top-level Fluvio client.This class is not intended to be constructed manually.