Skip to content

Commit 3dd5426

Browse files
committed
Polish "Adjust to changes in Spring AMQP 2.2 snapshots"
See gh-17587
1 parent e71a417 commit 3dd5426

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,8 @@ public static class SimpleContainer extends AmqpContainer {
663663
private Integer maxConcurrency;
664664

665665
/**
666-
* Number of messages to be processed between acks when the acknowledge mode is
667-
* AUTO. If larger than prefetch, prefetch will be increased to this value.
666+
* Batch size, expressed as the number of physical messages, to be used by the
667+
* container.
668668
*/
669669
private Integer batchSize;
670670

@@ -692,19 +692,19 @@ public void setMaxConcurrency(Integer maxConcurrency) {
692692
}
693693

694694
/**
695-
* Get the number of messages processed in one transaction.
696-
* @return number of messages
695+
* Return the number of messages processed in one transaction.
696+
* @return the number of messages
697697
* @deprecated since 2.2.0 in favor of {@link SimpleContainer#getBatchSize()}
698698
*/
699-
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.batchSize")
699+
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.batch-size")
700700
@Deprecated
701701
public Integer getTransactionSize() {
702702
return getBatchSize();
703703
}
704704

705705
/**
706706
* Set the number of messages processed in one transaction.
707-
* @param transactionSize number of messages
707+
* @param transactionSize the number of messages
708708
* @deprecated since 2.2.0 in favor of
709709
* {@link SimpleContainer#setBatchSize(Integer)}
710710
*/

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ void testSimpleRabbitListenerContainerFactoryWithCustomSettings() {
403403
}
404404

405405
@Test
406+
@Deprecated
406407
void testRabbitListenerContainerFactoryWithDeprecatedTransactionSizeStillWorks() {
407408
this.contextRunner
408409
.withUserConfiguration(MessageConvertersConfiguration.class, MessageRecoverersConfiguration.class)

0 commit comments

Comments
 (0)