Remove deprecated spring.rabbitmq.listener.* properties

See gh-9055, gh-9108
pull/7241/merge
Stephane Nicoll 8 years ago
parent 2894e57146
commit 1e9c1a68e4

@ -22,7 +22,6 @@ import java.util.List;
import org.springframework.amqp.core.AcknowledgeMode; import org.springframework.amqp.core.AcknowledgeMode;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory.CacheMode; import org.springframework.amqp.rabbit.connection.CachingConnectionFactory.CacheMode;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -502,100 +501,6 @@ public class RabbitProperties {
this.type = containerType; this.type = containerType;
} }
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.auto-startup")
@Deprecated
public boolean isAutoStartup() {
return getSimple().isAutoStartup();
}
@Deprecated
public void setAutoStartup(boolean autoStartup) {
getSimple().setAutoStartup(autoStartup);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.acknowledge-mode")
@Deprecated
public AcknowledgeMode getAcknowledgeMode() {
return getSimple().getAcknowledgeMode();
}
@Deprecated
public void setAcknowledgeMode(AcknowledgeMode acknowledgeMode) {
getSimple().setAcknowledgeMode(acknowledgeMode);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.concurrency")
@Deprecated
public Integer getConcurrency() {
return getSimple().getConcurrency();
}
@Deprecated
public void setConcurrency(Integer concurrency) {
getSimple().setConcurrency(concurrency);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.max-concurrency")
@Deprecated
public Integer getMaxConcurrency() {
return getSimple().getMaxConcurrency();
}
@Deprecated
public void setMaxConcurrency(Integer maxConcurrency) {
getSimple().setMaxConcurrency(maxConcurrency);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.prefetch")
@Deprecated
public Integer getPrefetch() {
return getSimple().getPrefetch();
}
@Deprecated
public void setPrefetch(Integer prefetch) {
getSimple().setPrefetch(prefetch);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.transaction-size")
@Deprecated
public Integer getTransactionSize() {
return getSimple().getTransactionSize();
}
@Deprecated
public void setTransactionSize(Integer transactionSize) {
getSimple().setTransactionSize(transactionSize);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.default-requeue-rejected")
@Deprecated
public Boolean getDefaultRequeueRejected() {
return getSimple().getDefaultRequeueRejected();
}
@Deprecated
public void setDefaultRequeueRejected(Boolean defaultRequeueRejected) {
getSimple().setDefaultRequeueRejected(defaultRequeueRejected);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.idle-event-interval")
@Deprecated
public Long getIdleEventInterval() {
return getSimple().getIdleEventInterval();
}
@Deprecated
public void setIdleEventInterval(Long idleEventInterval) {
getSimple().setIdleEventInterval(idleEventInterval);
}
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.retry")
@Deprecated
public ListenerRetry getRetry() {
return getSimple().getRetry();
}
public SimpleContainer getSimple() { public SimpleContainer getSimple() {
return this.simple; return this.simple;
} }

@ -363,72 +363,6 @@
"description": "Create an AmqpAdmin bean.", "description": "Create an AmqpAdmin bean.",
"defaultValue": true "defaultValue": true
}, },
{
"name": "spring.rabbitmq.listener.retry.enabled",
"type": "java.lang.Boolean",
"description": "Whether or not publishing retries are enabled.",
"sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry",
"defaultValue": false,
"deprecated": true,
"deprecation": {
"replacement": "spring.rabbitmq.listener.simple.retry.enabled"
}
},
{
"name": "spring.rabbitmq.listener.retry.initial-interval",
"type": "java.lang.Long",
"description": "Interval between the first and second attempt to publish or deliver a message.",
"sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry",
"defaultValue": 1000,
"deprecated": true,
"deprecation": {
"replacement": "spring.rabbitmq.listener.simple.retry.initial-interval"
}
},
{
"name": "spring.rabbitmq.listener.retry.max-attempts",
"type": "java.lang.Integer",
"description": "Maximum number of attempts to publish or deliver a message.",
"sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry",
"defaultValue": 3,
"deprecated": true,
"deprecation": {
"replacement": "spring.rabbitmq.listener.simple.retry.max-attempts"
}
},
{
"name": "spring.rabbitmq.listener.retry.max-interval",
"type": "java.lang.Long",
"description": "Maximum interval between attempts.",
"sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry",
"defaultValue": 10000,
"deprecated": true,
"deprecation": {
"replacement": "spring.rabbitmq.listener.simple.retry.max-interval"
}
},
{
"name": "spring.rabbitmq.listener.retry.multiplier",
"type": "java.lang.Double",
"description": "A multiplier to apply to the previous retry interval.",
"sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry",
"defaultValue": 1,
"deprecated": true,
"deprecation": {
"replacement": "spring.rabbitmq.listener.simple.retry.multiplier"
}
},
{
"name": "spring.rabbitmq.listener.retry.stateless",
"type": "java.lang.Boolean",
"description": "Whether or not retries are stateless or stateful.",
"sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry",
"defaultValue": true,
"deprecated": true,
"deprecation": {
"replacement": "spring.rabbitmq.listener.simple.retry.stateless"
}
},
{ {
"name": "spring.session.hazelcast.flush-mode", "name": "spring.session.hazelcast.flush-mode",
"defaultValue": "on-save" "defaultValue": "on-save"

@ -293,28 +293,10 @@ public class RabbitAutoConfigurationTests {
assertThat(adviceChain).isNull(); assertThat(adviceChain).isNull();
} }
@Test
@Deprecated
public void testSimpleRabbitListenerContainerFactoryWithCustomDeprecatedSettings() {
testSimpleRabbitListenerContainerFactoryWithCustomSettings(
"spring.rabbitmq.listener.retry.enabled:true",
"spring.rabbitmq.listener.retry.maxAttempts:4",
"spring.rabbitmq.listener.retry.initialInterval:2000",
"spring.rabbitmq.listener.retry.multiplier:1.5",
"spring.rabbitmq.listener.retry.maxInterval:5000",
"spring.rabbitmq.listener.autoStartup:false",
"spring.rabbitmq.listener.acknowledgeMode:manual",
"spring.rabbitmq.listener.concurrency:5",
"spring.rabbitmq.listener.maxConcurrency:10",
"spring.rabbitmq.listener.prefetch:40",
"spring.rabbitmq.listener.defaultRequeueRejected:false",
"spring.rabbitmq.listener.idleEventInterval:5",
"spring.rabbitmq.listener.transactionSize:20");
}
@Test @Test
public void testSimpleRabbitListenerContainerFactoryWithCustomSettings() { public void testSimpleRabbitListenerContainerFactoryWithCustomSettings() {
testSimpleRabbitListenerContainerFactoryWithCustomSettings( load(new Class<?>[] { MessageConvertersConfiguration.class,
MessageRecoverersConfiguration.class },
"spring.rabbitmq.listener.simple.retry.enabled:true", "spring.rabbitmq.listener.simple.retry.enabled:true",
"spring.rabbitmq.listener.simple.retry.maxAttempts:4", "spring.rabbitmq.listener.simple.retry.maxAttempts:4",
"spring.rabbitmq.listener.simple.retry.initialInterval:2000", "spring.rabbitmq.listener.simple.retry.initialInterval:2000",
@ -328,11 +310,6 @@ public class RabbitAutoConfigurationTests {
"spring.rabbitmq.listener.simple.defaultRequeueRejected:false", "spring.rabbitmq.listener.simple.defaultRequeueRejected:false",
"spring.rabbitmq.listener.simple.idleEventInterval:5", "spring.rabbitmq.listener.simple.idleEventInterval:5",
"spring.rabbitmq.listener.simple.transactionSize:20"); "spring.rabbitmq.listener.simple.transactionSize:20");
}
private void testSimpleRabbitListenerContainerFactoryWithCustomSettings(String... environment) {
load(new Class<?>[] { MessageConvertersConfiguration.class,
MessageRecoverersConfiguration.class }, environment);
SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory = this.context SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory = this.context
.getBean("rabbitListenerContainerFactory", .getBean("rabbitListenerContainerFactory",
SimpleRabbitListenerContainerFactory.class); SimpleRabbitListenerContainerFactory.class);

Loading…
Cancel
Save