Kafka producer performance issue in spring boot 2.7

Kafka producer (kafkaTemplate.send method ) takes longer time around 5 second to produce a message in topic when testing it with 90 hits per second constant load.

Few request (180 requests out of 175000) to Kafka template send method causes this issue.
I am using sprint-Kafka 2.8 version

I tried to change batch.size and linger.ms but no luck.

This application requires low latency

Any suggestion to fix this?

1 Like

What happens if you update to latest version 3?