-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-2640: Fix leak for non-confirmed channel
Fixes: #2640 Rabbit server was unstable for a while. Once restored, we were unable to publish new confirmed messages to it (the max number of channel on connection was reached and the existing channels were ignored). Essentially `PublisherCallbackChannel` instances ara waiting for acks on their confirms which never going to happen. Therefore, these channels are not closed and cache state is not reset. * Fix `CachingConnectionFactory.CachedChannelInvocationHandler.returnToCache()` to schedule `waitForConfirms()` in the separate thread. If `TimeoutException` happens, perform `physicalClose()` to avoid any possible memory leaks * Adjust `RabbitTemplatePublisherCallbacksIntegrationTests.testPublisherConfirmNotReceived()` to ensure that "unconfirmed" channel is closed and `CachingConnectionFactory` can produce a new channel (cherry picked from commit 9a8d741)
- Loading branch information
1 parent
6e6d9d1
commit d90b175
Showing
2 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters