Skip to main content
Version: 8.3 Beta 🚧

system.kafka.pollPartition

This function is used in Python Scripting.

Description​

Returns a list of records polled from a specified partition.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.kafka.pollPartition(connector, topic, partition, offset, [options])

Parameters​

TypeParameterDescription
StringconnectorThe name of the Kafka connector.
StringtopicThe name of the Kafka topic.
IntegerpartitionThe partition to poll.
LongoffsetThe position of offset to start the poll at.
DictionaryoptionsCustom options specific to the consumer, with key value string pairs. Optional.

Returns​

List - A list of records polled from a specified partition.

Scope​

Gateway

Code Examples​

Example #1
# Get a list of records from the specified partition.
system.kafka.pollPartition("MyKafkaConnector", "MyKafkaTopic", 2, 4)