JDBC Sink Configuration Options batch.size

青春壹個敷衍的年華 提交于 2021-02-11 13:50:08

问题


From https://docs.confluent.io/3.1.1/connect/connect-jdbc/docs/sink_config_options.html#jdbc-sink-configuration-options

Specifies how many records to attempt to batch together for insertion into the destination table, when possible.

Type: int
Default: 3000
Valid Values: [0,…]
Importance: medium

So, this is from Confluent site.

Importance is medium, default is 3000. What if I want the KAFKA changes every 30 secs even if there are say, only 27 KAFKA messages for the topic? What is default setting in which processing occurs on a per elapsed time basis? We all know this is catered for as we can run many examples just passing 1 records from, say mySQL to SQLServer, but I cannot find the parameter value for time based processing. Can I influence it?

https://github.com/confluentinc/kafka-connect-jdbc/issues/290 Noted this as well. Some interesting stuff there.


回答1:


I think you should focus on the words "when possible"

consumer.max.poll.records will always grab up to that many records from Kafka. Once a poll is complete, the JDBC sink will build as many batches as needed until the next consumer poll is called within consumer.max.poll.interval.ms



来源:https://stackoverflow.com/questions/59802345/jdbc-sink-configuration-options-batch-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!