Skip to content

Enable auto-startup for DefaultMessageListenerContainer #4976

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhl221123
Copy link

This PR modifies DefaultMessageListenerContainer to enable auto-startup by default, allowing it to participate more fully in the Spring container-managed lifecycle.

Key changes:

  • Introduced an autoStartup boolean property (defaulting to true), making isAutoStartup() return this value.
  • A public setter setAutoStartup(boolean) allows users to disable this behavior if necessary.

Closes #4403

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

This change modifies DefaultMessageListenerContainer to automatically start when the Spring application context is initialized, by default.

The 'autoStartup' property defaults to true. A setter 'setAutoStartup(boolean)' has been added to allow users to disable this behavior if needed.

Closes spring-projects#4403

Signed-off-by: Junhyeok Lee <jhl221123@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch DefaultMessageListenerContainer to auto-startup
2 participants