confluent-kafka-dotnet
confluent-kafka-dotnet copied to clipboard
LingerMs default is 0 or 5?
Description
The comment for ProducerConfig.LingerMs
says that the default is 5, whereas the confluent docs say it's 0. Is this a typo or does the dotnet client actually supply different defaults?
those docs are for the java client.
in librdkafka (and the dotnet client), the default is 5ms. https://github.com/edenhill/librdkafka/blob/master/src/rdkafka_conf.c#L1326
5ms is a better general purpose default setting which is good for a very wide range of scenarios. you would only want 0ms for low throughput applications where latency is critical (you will get better latency in higher throughput scenarios with a non-zero linger.ms).
Thanks for the reply. If we're using ProduceAsync (albeit with concurrent calls to it) are we also getting the benefit of LingerMs? Or would we have to use Produce?
ProduceAsync
and Produce
are both thin layers on top of the same librdkafka capability. Applies to both.