openconfig / gnmic

gNMIc is a gNMI CLI client and collector
https://gnmic.openconfig.net
Apache License 2.0
168 stars 54 forks source link

Add a config option for kafka producer flush frequency #412

Closed alibresco closed 4 months ago

alibresco commented 4 months ago

Sarama exposes a config option for the best effort frequency of flushes.

This option tells the library to hold kafka messages for up to this amount of time with the goal of better client-side compression and batching. This can lead to peformance improvements in both gnmic and on the kafka broker.

By default, sarama sets this value to 0 which indicates that it should flush as frequently as possible. This PR preserves that behavior while adding a knob to increase the frequency.

karimra commented 4 months ago

Thanks for the contribution