I am following this to create an Elasticsearch sink in a Flink application. I want to understand what will be priority if I provide all the values like
int FLUSH_MAX_ACTIONS = 10_000;
long FLUSH_INTERVAL_MILLIS = 1_000;
int FLUSH_MAX_SIZE_MB = 1;
esSinkBuilder.setBulkFlushMaxActions(FLUSH_MAX_ACTIONS);
esSinkBuilder.setBulkFlushInterval(FLUSH_INTERVAL_MILLIS);
esSinkBuilder.setBulkFlushMaxSizeMb(FLUSH_MAX_SIZE_MB);
esSinkBuilder.setBulkFlushBackoff(true);
In this case, I specified to flush
As I am specifying all three at once, what will be the result, which one takes precedence ?
Whichever limit is reached first triggers the flush. This is handled by org.elasticsearch.action.bulk.BulkProcessor
.