Add configuration option for channelRpcTimeout
This commit adds a configuration option to configure RabbitConnectionFactory's channelRpcTimeout property. See gh-23564
This commit is contained in:
committed by
Stephane Nicoll
parent
341bccbdd7
commit
baa9d129f2
@@ -149,6 +149,8 @@ public class RabbitAutoConfiguration {
|
||||
}
|
||||
map.from(properties::getConnectionTimeout).whenNonNull().asInt(Duration::toMillis)
|
||||
.to(factory::setConnectionTimeout);
|
||||
map.from(properties::getChannelRpcTimeout).whenNonNull().asInt(Duration::toMillis)
|
||||
.to(factory::setChannelRpcTimeout);
|
||||
map.from(credentialsProvider::getIfUnique).whenNonNull().to(factory::setCredentialsProvider);
|
||||
map.from(credentialsRefreshService::getIfUnique).whenNonNull().to(factory::setCredentialsRefreshService);
|
||||
factory.afterPropertiesSet();
|
||||
|
||||
@@ -119,6 +119,11 @@ public class RabbitProperties {
|
||||
* Connection timeout. Set it to zero to wait forever.
|
||||
*/
|
||||
private Duration connectionTimeout;
|
||||
|
||||
/**
|
||||
* Channel RPC timeout.
|
||||
*/
|
||||
private Duration channelRpcTimeout;
|
||||
|
||||
/**
|
||||
* Cache configuration.
|
||||
@@ -323,6 +328,10 @@ public class RabbitProperties {
|
||||
public Duration getConnectionTimeout() {
|
||||
return this.connectionTimeout;
|
||||
}
|
||||
|
||||
public Duration getChannelRpcTimeout() {
|
||||
return this.channelRpcTimeout;
|
||||
}
|
||||
|
||||
public void setPublisherConfirmType(ConfirmType publisherConfirmType) {
|
||||
this.publisherConfirmType = publisherConfirmType;
|
||||
@@ -335,6 +344,10 @@ public class RabbitProperties {
|
||||
public void setConnectionTimeout(Duration connectionTimeout) {
|
||||
this.connectionTimeout = connectionTimeout;
|
||||
}
|
||||
|
||||
public void setChannelRpcTimeout(Duration channelRpcTimeout) {
|
||||
this.channelRpcTimeout = channelRpcTimeout;
|
||||
}
|
||||
|
||||
public Cache getCache() {
|
||||
return this.cache;
|
||||
|
||||
Reference in New Issue
Block a user