Skip to main content
Version: 8.3 Beta 🚧

system.kafka.seekLatest

This function is used in Python Scripting.

Description​

Retrieves the last N number of records from a specified topic.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.kafka.seekLatest(connector, topic, partition, recordCount, [options])

Parameters​

TypeParameterDescription
StringconnectorThe name of the Kafka connector.
StringtopicThe name of the Kafka topic.
IntegerpartitionThe partition to target.
IntegerrecordCountThe number of records to return.
DictionaryoptionsCustom options specific to the consumer, with key value string pairs. Optional.

Returns​

List - An N number of records from a specified topic, as a list.

Scope​

Gateway

Code Examples​

Example #1
# Returns the latest 5 records from the specified topic.
system.kafka.listTopics("MyKafkaConnector", "MyKafkaTopic", 3, 5)