kafka_poll()

Read(324) Label: get records, table sequence, cursor,

Description:

Return records in a Consumer topic as a table sequence.

Syntax:

kafka_poll (fd, timeout) 

Note:

The function gets records of the current Consumer topic.

Parameters:

fd

A Consumer object

timeout

The interval of consumer poll loop; default is 1000ms

Options:

@c

Enable a cursor-based query

Return value:

Table sequence or cursor

Example:

 

A

 

1

=kafka_subscribe("D:/kafka_string.properties";"topic-test";"String","byte[]")

Connect to Kafka server

2

=kafka_poll(A1)

Get records from topic test1

3

=kafka_poll@c(A1)

Get records from topic test1 with cursor