问题
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