Skip to content

Refactor RabbitClient for shared resource management and cleanup#16

Merged
twisti-dev merged 2 commits into
version/26.1from
perf/shared-consumer-executor
Jun 1, 2026
Merged

Refactor RabbitClient for shared resource management and cleanup#16
twisti-dev merged 2 commits into
version/26.1from
perf/shared-consumer-executor

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

This pull request updates the project version and improves resource management in the RabbitMQ client implementation. The main focus is on introducing a shared thread pool for RabbitMQ consumers, ensuring proper shutdown of shared resources, and replacing coroutine-based shutdown logic with blocking calls for better reliability during shutdown.

Resource management improvements:

  • Added a shared thread pool (sharedConsumerExecutor) for RabbitMQ consumers and ensured it is properly initialized and shut down with the client, improving thread management and reducing the risk of resource leaks. [1] [2] [3] [4]
  • Renamed and refactored the shutdown method from closeEventLoopGroup (coroutine-based) to closeSharedResources (blocking), and replaced coroutine delays with Thread.sleep to ensure synchronous shutdown of resources. [1] [2] [3]

Dependency and version updates:

  • Updated the project version in gradle.properties from 1.5.2 to 1.5.3.

Code cleanup and improvements:

  • Updated imports and replaced coroutine-specific dependencies with standard Java concurrency utilities to support the new blocking shutdown logic.

…urces with ExecutorService

- introduce sharedConsumerExecutor for managing consumer threads
- rename closeEventLoopGroup to closeSharedResources for clarity
- update shutdown logic to ensure proper resource cleanup
@twisti-dev twisti-dev self-assigned this Jun 1, 2026
Copilot AI review requested due to automatic review settings June 1, 2026 17:23
@twisti-dev twisti-dev merged commit 5488b02 into version/26.1 Jun 1, 2026
@twisti-dev twisti-dev deleted the perf/shared-consumer-executor branch June 1, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants