feat: use auto flush configuration from client config string #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connector flushing behaviour should now be more intuitive:
allowed.lag
period then the connector flushes even if theauto_flush_interval
is not yet expired. This reduces latency without sacrificing maximum throughput: If there is a continuous stream of events then the connector will flush only when eitherauto_flush_interval
expires or the connector accumulates more thanauto_flush_rows
rows.Implementation notes
The connector reads flushing parameters from client configuration string. The conf. string is then patched to disable flushing entirely and this patched string is used to create an ILP client instance. This means the client won't ever auto-flush on its own and the connector is solely responsible for calling explicit
flush()
. This design has performance advantages: Kafka Connect delivers messages in batches and the connector can flush after only finishing the current batch. This has performance advantages over flushing mid-batch.