Skip to content

Commit 26c1e38

Browse files
garyrussellsnicoll
authored andcommitted
Polish RabbitMQ properties doc
Fix description for `prefetch`; remove reference to transactions since the direct container does not support transactionSize. Also fix `transactionSize` to just reference acks; autoConfiguration doesn't support enabling transactions. Closes gh-14569
1 parent bc99fa6 commit 26c1e38

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ public abstract static class AmqpContainer {
577577
private AcknowledgeMode acknowledgeMode;
578578

579579
/**
580-
* Number of messages to be handled in a single request. It should be greater than
581-
* or equal to the transaction size (if used).
580+
* Maximum number of unacknowledged messages that can be outstanding at each
581+
* consumer.
582582
*/
583583
private Integer prefetch;
584584

@@ -659,9 +659,8 @@ public static class SimpleContainer extends AmqpContainer {
659659
private Integer maxConcurrency;
660660

661661
/**
662-
* Number of messages to be processed in a transaction. That is, the number of
663-
* messages between acks. For best results, it should be less than or equal to the
664-
* prefetch count.
662+
* Number of messages to be processed between acks when the acknowledge mode is
663+
* AUTO. If larger than prefetch, prefetch will be increased to this value.
665664
*/
666665
private Integer transactionSize;
667666

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ content into your application. Rather, pick only the properties that you need.
10821082
spring.rabbitmq.listener.direct.consumers-per-queue= # Number of consumers per queue.
10831083
spring.rabbitmq.listener.direct.default-requeue-rejected= # Whether rejected deliveries are re-queued by default.
10841084
spring.rabbitmq.listener.direct.idle-event-interval= # How often idle container events should be published.
1085-
spring.rabbitmq.listener.direct.prefetch= # Number of messages to be handled in a single request. It should be greater than or equal to the transaction size (if used).
1085+
spring.rabbitmq.listener.direct.prefetch= # Maximum number of unacknowledged messages that can be outstanding at each consumer.
10861086
spring.rabbitmq.listener.direct.retry.enabled=false # Whether publishing retries are enabled.
10871087
spring.rabbitmq.listener.direct.retry.initial-interval=1000ms # Duration between the first and second attempt to deliver a message.
10881088
spring.rabbitmq.listener.direct.retry.max-attempts=3 # Maximum number of attempts to deliver a message.
@@ -1102,7 +1102,7 @@ content into your application. Rather, pick only the properties that you need.
11021102
spring.rabbitmq.listener.simple.retry.max-interval=10000ms # Maximum duration between attempts.
11031103
spring.rabbitmq.listener.simple.retry.multiplier=1 # Multiplier to apply to the previous retry interval.
11041104
spring.rabbitmq.listener.simple.retry.stateless=true # Whether retries are stateless or stateful.
1105-
spring.rabbitmq.listener.simple.transaction-size= # Number of messages to be processed in a transaction. That is, the number of messages between acks. For best results, it should be less than or equal to the prefetch count.
1105+
spring.rabbitmq.listener.simple.transaction-size= # 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.
11061106
spring.rabbitmq.listener.type=simple # Listener container type.
11071107
spring.rabbitmq.password=guest # Login to authenticate against the broker.
11081108
spring.rabbitmq.port=5672 # RabbitMQ port.

0 commit comments

Comments
 (0)