You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@GetMapping("send")
publicStringsend(Stringmsg){
// When the first message is sent, createConnection will cause blocking of channel.checkout-timeout ms.rabbitTemplate.convertAndSend("test-queue",msg);
returnmsg;
}
CachingConnectionFactory#waitForConnection
privateChannelCachingConnectionProxywaitForConnection(longnow) {
ChannelCachingConnectionProxycachedConnection = null;
//I think the problem should not wait in this spin-waiting, the first time you create a connection.while (cachedConnection == null && System.currentTimeMillis() - now < this.channelCheckoutTimeout) {
if (countOpenConnections() >= this.connectionLimit) {
try {
this.connectionMonitor.wait(this.channelCheckoutTimeout);
cachedConnection = findIdleConnection();
}
catch (InterruptedExceptione) {
Thread.currentThread().interrupt();
thrownewAmqpException("Interrupted while waiting for a connection", e);
}
}
}
returncachedConnection;
}
The text was updated successfully, but these errors were encountered:
Fixesspring-projects#1026
When using a `channelCheckoutTimeout` with `CacheModeConnection`,
we incorrectly spin waiting for a connection until the timeout
expires.
We should only wait for a connection if the limit is exceeded.
**cherry-pick to all supported**
Fixes#1026
When using a `channelCheckoutTimeout` with `CacheModeConnection`,
we incorrectly spin waiting for a connection until the timeout
expires.
We should only wait for a connection if the limit is exceeded.
**cherry-pick to all supported**
Fixes#1026
When using a `channelCheckoutTimeout` with `CacheModeConnection`,
we incorrectly spin waiting for a connection until the timeout
expires.
We should only wait for a connection if the limit is exceeded.
**cherry-pick to all supported**
(cherry picked from commit dde7a37)
Fixes#1026
When using a `channelCheckoutTimeout` with `CacheModeConnection`,
we incorrectly spin waiting for a connection until the timeout
expires.
We should only wait for a connection if the limit is exceeded.
**cherry-pick to all supported**
(cherry picked from commit dde7a37)
# Conflicts:
# spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java
# spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java
Fixes#1026
When using a `channelCheckoutTimeout` with `CacheModeConnection`,
we incorrectly spin waiting for a connection until the timeout
expires.
We should only wait for a connection if the limit is exceeded.
**cherry-pick to all supported**
(cherry picked from commit dde7a37)
# Conflicts:
# spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java
# spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java
# Conflicts:
# spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java
Uh oh!
There was an error while loading. Please reload this page.
Bug report
version: 2.1.6-RELEASE
When cachemode is connection, setting channel.checkout-timeout will cause the first createConnection to wait for checkout-timeout ms
application.properties
java code
CachingConnectionFactory#waitForConnection
The text was updated successfully, but these errors were encountered: