Skip to content

fix(rabbitmq): use shared Netty EventLoopGroup to prevent resource leaks and shutdown issues#163

Merged
juancgalvis merged 3 commits intoreactive-commons:masterfrom
luisgomez29:feature/netty-event-loop-group
Jan 28, 2026
Merged

fix(rabbitmq): use shared Netty EventLoopGroup to prevent resource leaks and shutdown issues#163
juancgalvis merged 3 commits intoreactive-commons:masterfrom
luisgomez29:feature/netty-event-loop-group

Conversation

@luisgomez29
Copy link
Contributor

Description

This PR resolves the recurring logs "Could not close event loop group in 10 seconds" when using RabbitMQ with Netty, following the official recommendations from the RabbitMQ documentation.

Changes

  • Implements a shared EventLoopGroup for all RabbitMQ connections, avoiding the creation of multiple thread groups and improving efficiency.
  • Uses the modern Netty API (MultiThreadIoEventLoopGroup and NioIoHandler.newFactory()), allowing Netty to automatically determine the optimal number of threads.
  • Centralizes the management and shutdown of the thread group, ensuring proper resource release when the application finishes.
  • Updates logs to reflect the use of the default configuration and the correct initialization of the thread group.

@luisgomez29 luisgomez29 changed the title feat(lifecycle): use shared EventLoopGroup and optimal configuration for RabbitMQ with Netty fix: use shared EventLoopGroup and optimal configuration for RabbitMQ with Netty Jan 28, 2026
@luisgomez29 luisgomez29 changed the title fix: use shared EventLoopGroup and optimal configuration for RabbitMQ with Netty fix(rabbitmq): use shared Netty EventLoopGroup to prevent resource leaks and shutdown issues Jan 28, 2026
@juancgalvis juancgalvis merged commit 8d8ef54 into reactive-commons:master Jan 28, 2026
1 check passed
@juancgalvis
Copy link
Contributor

🎉 This PR is included in version 7.0.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@luisgomez29 luisgomez29 deleted the feature/netty-event-loop-group branch January 28, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants