Skip to content

docs(sqs): clarify acknowledgementMode interaction with custom container factory beans - #1683

Open
shubham-asthana wants to merge 1 commit into
awspring:mainfrom
shubham-asthana:docs/971-clarify-acknowledgement-mode-factory-name
Open

docs(sqs): clarify acknowledgementMode interaction with custom container factory beans#1683
shubham-asthana wants to merge 1 commit into
awspring:mainfrom
shubham-asthana:docs/971-clarify-acknowledgement-mode-factory-name

Conversation

@shubham-asthana

Copy link
Copy Markdown

Fixes #971

When a custom SqsMessageListenerContainerFactory bean is declared under a name
other than defaultSqsListenerContainerFactory, Spring Boot's autoconfiguration
backs off and no bean is registered under the default name. Any @SqsListener
relying on the default factory - for example to use acknowledgementMode - then
fails at startup with an unhelpful IllegalArgumentException.

This documents the two ways to resolve it (explicit factory property, or a
SqsListenerConfigurer calling setDefaultListenerContainerFactoryBeanName),
and adds the missing setDefaultListenerContainerFactoryBeanName entry to the
Global configuration for @SqsListeners attribute list, which wasn't
documented at all previously.

Builds on the discussion in #979, rewritten in third-person to match the doc's style.

Verified locally: built the docs module with the docs-classic profile and
confirmed both additions render correctly in sqs.html.

…ner factory beans

When a custom SqsMessageListenerContainerFactory bean is declared under a
name other than defaultSqsListenerContainerFactory, Spring Boot's
autoconfiguration backs off, so @SqsListener methods relying on the
default factory (e.g. to set acknowledgementMode) fail at startup with
an unhelpful IllegalArgumentException. Document the workaround via
factory or SqsListenerConfigurer#setDefaultListenerContainerFactoryBeanName,
and add the missing setDefaultListenerContainerFactoryBeanName entry to
the registrar attribute list.

Fixes awspring#971
@github-actions github-actions Bot added the type: documentation Documentation or Samples related issue label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: documentation Documentation or Samples related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Documentation on Mixed use of AcknowledgementMode and MessageListenerContainerFactory

1 participant