Sign in
Log inSign up
Joshua Steward

3.9K reads

2 comments

VyOR
VyOR
Jun 5, 2024

Not fair test, because during async you are awaiting delivery result, but with sync not (actually fire and forget). Call flush after sync produce to await callback get called

·
·1 reply
VyOR
VyOR
Jun 5, 2024

Result with flush | Method | Mean | Error | StdDev | Allocated | |------------------- |---------:|---------:|---------:|----------:| | KafkaProducerSync | 15.90 ms | 0.216 ms | 0.192 ms | 6.32 KB | | KafkaProducerAsync | 15.55 ms | 0.214 ms | 0.200 ms | 6.77 KB |

·