From 5e6547c7583940a8b7539a8d2674023e20db0eba Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 12 Jul 2023 16:50:03 -0400 Subject: [PATCH] GH-8668: AMQP Docs for Exclusive and S-A Consumers Resolves https://github.com/spring-projects/spring-integration/issues/8668 **cherry-pick to all supported branches** (cherry picked from commit fc3c8d2c8d9f23613b870d2cacc3eb7cee9992fd) # Conflicts: # src/reference/asciidoc/amqp.adoc --- src/reference/asciidoc/amqp.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reference/asciidoc/amqp.adoc b/src/reference/asciidoc/amqp.adoc index ec86b75c8e..5209e603b0 100644 --- a/src/reference/asciidoc/amqp.adoc +++ b/src/reference/asciidoc/amqp.adoc @@ -252,6 +252,10 @@ In that regard, it is more similar to the JMS message-driven channel adapter. Starting with version 5.5, the `AmqpInboundChannelAdapter` can be configured with an `org.springframework.amqp.rabbit.retry.MessageRecoverer` strategy which is used in the `RecoveryCallback` when the retry operation is called internally. See `setMessageRecoverer()` JavaDocs for more information. +IMPORTANT: When using exclusive or single-active consumers in the listener container, it is recommended that you set the container property `forceStop` to `true`. +This will prevent a race condition where, after stopping the container, another consumer could start consuming messages before this instance has fully stopped. +For this option to be available, the Spring AMQP dependency has to be explicitly upgraded to the latest version of `2.4.x` generation (this is automatic with Boot 2.6.x, 2.7.x). + [[amqp-debatching]] ==== Batched Messages