swift-server / swift-kafka-client

Apache License 2.0
83 stars 23 forks source link

`KafkaProducer`: refactor flushing #94

Closed felixschlegel closed 1 year ago

felixschlegel commented 1 year ago

Motivation:

With our own flushing implementation we were flushing until rd_kakfa_outq_len reached 0. However rd_kakfa_outq_len also takes other events such as statistics into account which led to a race where we were flushing for a very long time because more and more other events were produced to the queue while we were flushing.

Modifications:

felixschlegel commented 1 year ago

@FranzBusch : how shall we go about vending the flush timeout to the user?

FranzBusch commented 1 year ago

how shall we go about vending the flush timeout to the user?

We should put it into our configuration struct.