interface EventBatch

A batch of events delivered to a consumer.

Type Parameters

T = unknown
Cursor = string

Properties

topic: string

The topic this batch was received from.

The consumer group that received this batch.

Events in this batch.

Cursor representing the position after this batch. Use for manual commits.

Methods

commit(): Promise<void>

Commit this batch's cursor to mark progress.

After processing events successfully, call this to save the cursor position. On restart, the consumer will resume from this position.

Usage

import { type EventBatch } from ".";