Polish "Adjust to changes in Spring AMQP 2.2 snapshots"

See gh-17587
This commit is contained in:
Stephane Nicoll
2019-07-19 13:20:25 +02:00
parent e71a417399
commit 3dd5426ea5
2 changed files with 7 additions and 6 deletions

View File

@@ -663,8 +663,8 @@ public class RabbitProperties {
private Integer maxConcurrency;
/**
* Number of messages to be processed between acks when the acknowledge mode is
* AUTO. If larger than prefetch, prefetch will be increased to this value.
* Batch size, expressed as the number of physical messages, to be used by the
* container.
*/
private Integer batchSize;
@@ -692,11 +692,11 @@ public class RabbitProperties {
}
/**
* Get the number of messages processed in one transaction.
* @return number of messages
* Return the number of messages processed in one transaction.
* @return the number of messages
* @deprecated since 2.2.0 in favor of {@link SimpleContainer#getBatchSize()}
*/
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.batchSize")
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.batch-size")
@Deprecated
public Integer getTransactionSize() {
return getBatchSize();
@@ -704,7 +704,7 @@ public class RabbitProperties {
/**
* Set the number of messages processed in one transaction.
* @param transactionSize number of messages
* @param transactionSize the number of messages
* @deprecated since 2.2.0 in favor of
* {@link SimpleContainer#setBatchSize(Integer)}
*/

View File

@@ -403,6 +403,7 @@ class RabbitAutoConfigurationTests {
}
@Test
@Deprecated
void testRabbitListenerContainerFactoryWithDeprecatedTransactionSizeStillWorks() {
this.contextRunner
.withUserConfiguration(MessageConvertersConfiguration.class, MessageRecoverersConfiguration.class)