The Wire · Showcase
Spring Kafka leaks serializer resources in a silent bug
By RepoJournal · Filed · About Spring
Spring Kafka's DelegatingByTypeSerializer has been leaking delegates for years, and a fix just landed with a cherry-pick across 4.1.x and 4.0.x.
Spring Kafka shipped a fix for a resource leak in DelegatingByTypeSerializer [1] where close() was never overridden, so delegates' close() never ran. The bug is real: the delegates map is private, and the only way to close them is through this fix [2]. Meanwhile, spring-amqp is on a dependabot treadmill: Jackson BOM bumps to 2.22.2 and 3.2.2 [3][4] and a reactor-bom move to a SNAPSHOT [5] that you should not adopt yet. Over in spring-tools, Spring AI moved to 2.0.1 [6] alongside a generic dependency update [7], nothing that demands attention. Spring Session advanced its development version [8]. The headline: this Kafka bug is the one that bites in production, so check your serializers.
One email a day. Unsubscribe in one click.
Keep up with Spring in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Inspect any DelegatingByTypeSerializer usage for delegate close gaps and consider cherry-picking the fix if you run 4.0.x or 4.1.x spring-projects/spring-kafka [immediate]
- → Skip the reactor-bom 2026.0.0-SNAPSHOT bump in spring-amqp; it is a milestone snapshot, not a release spring-projects/spring-amqp [monitor]
- → Review Jackson BOM updates to 2.22.2 and 3.2.2 when merged, but no action required yet spring-projects/spring-amqp [monitor]
References
- [1] GH-4569: Close delegates in DelegatingByTypeSerializer (#4570) spring-projects/spring-kafka
- [2] GH-4569: Close delegates in DelegatingByTypeSerializer ↗ spring-projects/spring-kafka
- [3] Bump com.fasterxml.jackson:jackson-bom from 2.22.1 to 2.22.2 ↗ spring-projects/spring-amqp
- [4] Bump tools.jackson:jackson-bom from 3.2.1 to 3.2.2 ↗ spring-projects/spring-amqp
- [5] Bump io.projectreactor:reactor-bom from 2026.0.0-M1 to 2026.0.0-SNAPSHOT ↗ spring-projects/spring-amqp
- [6] update spring ai to 2.0.1 spring-projects/spring-tools
- [7] dependency updates spring-projects/spring-tools
- [8] Next Development Version spring-projects/spring-session