@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.jms;
import java.time.Duration ;
import java.time.Duration ;
import org.springframework.boot.context.properties.ConfigurationProperties ;
import org.springframework.boot.context.properties.ConfigurationProperties ;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty ;
/ * *
/ * *
* Configuration properties for JMS .
* Configuration properties for JMS .
@ -148,7 +149,7 @@ public class JmsProperties {
/ * *
/ * *
* Minimum number of concurrent consumers .
* Minimum number of concurrent consumers .
* /
* /
private Integer c oncurrency;
private Integer minC oncurrency;
/ * *
/ * *
* Maximum number of concurrent consumers .
* Maximum number of concurrent consumers .
@ -178,12 +179,23 @@ public class JmsProperties {
this . acknowledgeMode = acknowledgeMode ;
this . acknowledgeMode = acknowledgeMode ;
}
}
@DeprecatedConfigurationProperty ( replacement = "spring.jms.listener.min-concurrency" , since = "3.2.0" )
@Deprecated ( since = "3.2.0" , forRemoval = true )
public Integer getConcurrency ( ) {
public Integer getConcurrency ( ) {
return this . concurrency ;
return this . minC oncurrency;
}
}
@Deprecated ( since = "3.2.0" , forRemoval = true )
public void setConcurrency ( Integer concurrency ) {
public void setConcurrency ( Integer concurrency ) {
this . concurrency = concurrency ;
this . minConcurrency = concurrency ;
}
public Integer getMinConcurrency ( ) {
return this . minConcurrency ;
}
public void setMinConcurrency ( Integer minConcurrency ) {
this . minConcurrency = minConcurrency ;
}
}
public Integer getMaxConcurrency ( ) {
public Integer getMaxConcurrency ( ) {
@ -195,11 +207,11 @@ public class JmsProperties {
}
}
public String formatConcurrency ( ) {
public String formatConcurrency ( ) {
if ( this . c oncurrency = = null ) {
if ( this . minC oncurrency = = null ) {
return ( this . maxConcurrency ! = null ) ? "1-" + this . maxConcurrency : null ;
return ( this . maxConcurrency ! = null ) ? "1-" + this . maxConcurrency : null ;
}
}
return ( ( this . maxConcurrency ! = null ) ? this . c oncurrency + "-" + this . maxConcurrency
return ( ( this . maxConcurrency ! = null ) ? this . minC oncurrency + "-" + this . maxConcurrency
: String . valueOf ( this . c oncurrency) ) ;
: String . valueOf ( this . minC oncurrency) ) ;
}
}
public Duration getReceiveTimeout ( ) {
public Duration getReceiveTimeout ( ) {