Skip to main content
Version: 3.3.x

Work with TableView

After setting up your clients, you can explore more to start working with TableView.

Configure TableView

The following is an example of how to configure a TableView.

  TableView<String> tv = client.newTableViewBuilder(Schema.STRING)

You can use the available parameters in the loadConf configuration or the API TableViewBuilder to customize your TableView.

topicstringyesThe topic name of the TableView.N/A
autoUpdatePartitionIntervalintnoThe interval to check for newly added partitions.60 (seconds)
subscriptionNamestringnoThe subscription name of the TableView.null

Register listeners

You can register listeners for both existing messages on a topic and new messages coming into the topic by using forEachAndListen, and specify to perform operations for all existing messages by using forEach.

The following is an example of how to register listeners with TableView.

// Register listeners for all existing and incoming messages
tv.forEachAndListen((key, value) -> /*operations on all existing and incoming messages*/)

// Register actions for all existing messages
tv.forEach((key, value) -> /*operations on all existing messages*/)