mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
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:
committed by
Dan Christian Bogos
parent
9c94fbfe58
commit
11b96de00a
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user