Code python

Kafka Consumer - Fetch Records from Beginning

Kontext Kontext visibility 1,491 comment 0 access_time 2 years ago language English

descriptionCode description

This code snippet reads data from topic's beginning offset by utilizing seek_to_beginning() API. This will sets each partitions subscribed by the consumers to fetch records from the earliest available offsets.

Example output:

Kontext message 1
Kontext message 2
Kontext message 3
Kontext message 4
Kontext message 5
New kontext events~!!
New events!
copyright This page is subject to Site terms.
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts