Add kafkaBatchSize configuration field

Avoids the default 1 second delay when the batch doesn't
reach 100 messages within that time.

Useful when the Kafka exporter is not cached, as it would
otherwise encounter that delay. Setting BatchSize to 1
prevents this.
This commit is contained in:
ionutboangiu
2024-06-30 10:01:10 +03:00
committed by Dan Christian Bogos
parent 9c94fbfe58
commit 11b96de00a
5 changed files with 19 additions and 1 deletions

View File

@@ -88,6 +88,10 @@ func NewKafkaEE(cfg *config.EventExporterCfg, dc *utils.SafeMapStorage) (*KafkaE
},
}
if opts.BatchSize != nil {
pstr.writer.BatchSize = *opts.BatchSize
}
return pstr, nil
}