Memory leak with spring-kafka 2.8.0

See original GitHub issue

Updating Spring Boot 2.5.7 to 2.6.1 brings spring-kafka 2.8.0, in a service with a massive kafka producer it causes a memory leak.

image

image

image

Rolling back to Spring Boot 2.5.7 fix the issue.

Sample Producer:

@Component
class KafkaProducer(
    private val kafkaTemplate: KafkaTemplate<String, MyObject>,
    private val kafkaLoggerCallback: KafkaLoggerCallback
) {

    @Async
    @EventListener
    fun process(id, String, event: MyObject) {
        kafkaTemplate.send("topic", id, event).addCallback(kafkaLoggerCallback)
    }

}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
artembilancommented, Dec 23, 2021

Yes, you can, but please, link back here when you raise an issue for Apache Kafka project, so we will know what is going on their side. Thanks

0reactions
garyrussellcommented, Jan 18, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

3.0.1- kafka admin clients created repeatedly - Memory leak ...
We have springboot app that consumes from a single topic and produces records to multiple topics. Recently upgraded this app to Sprinboot-2.6.7 ...
Read more >
spring-projects/spring-kafka - Gitter
This is very likely to create a memory leak. Stack trace of thread: This is a non-spring boot app. I am thinking it's...
Read more >
Release Notes - Kafka - Version 2.8.0
The upgrade notes discuss any critical information about incompatibilities and breaking changes, performance changes, and any other changes that might impact ...
Read more >
What's New in Apache Kafka 2.8 - KIP-500 - Confluent
I'm proud to announce the release of Apache Kafka 2.8.0 on behalf of the ... The 2.8.0 release contains many new features and...
Read more >
Debugging a memory leak in Apache Kafka® | by Javier Navarro
We then jumped into analyzing the Heap Memory usage. Turned out the broker that had the issue was getting an increased use of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found