Skip to content

feat: auto-configure virtual threads for SQS listener containers - #1695

Open
Theprathamshah wants to merge 1 commit into
awspring:mainfrom
Theprathamshah:feature/1693-sqs-virtual-threads
Open

feat: auto-configure virtual threads for SQS listener containers#1695
Theprathamshah wants to merge 1 commit into
awspring:mainfrom
Theprathamshah:feature/1693-sqs-virtual-threads

Conversation

@Theprathamshah

@Theprathamshah Theprathamshah commented Aug 30, 2026

Copy link
Copy Markdown

📢 Type of change

  • Enhancement

📜 Description

This pull request adds native support for Java 21+ Virtual Threads to SQS listener container factories.

  • Modifies SqsAutoConfiguration to detect the standard Spring Boot property spring.threads.virtual.enabled.
  • When enabled, configures SimpleAsyncTaskExecutor (with virtualThreads = true) for both the message processing executor (componentsTaskExecutor) and the acknowledgment executor (acknowledgementResultTaskExecutor).

💡 Motivation and Context

Closes #1693.
Integrates Spring Boot's global standard spring.threads.virtual.enabled toggle directly into Spring Cloud AWS SQS listeners, allowing users to leverage high-throughput non-blocking concurrency (Project Loom) out-of-the-box on Java 21+ stacks.

💚 How did you test it?

  1. Added unit tests in SqsAutoConfigurationTest verifying SQS containers operate on virtual threads when enabled and fallback to standard platform thread execution when disabled.
  2. Verified all tests compile and pass successfully.

@github-actions github-actions Bot added the component: sqs SQS integration related issue label Aug 30, 2026
@Theprathamshah
Theprathamshah force-pushed the feature/1693-sqs-virtual-threads branch from e5cf262 to 575275d Compare August 30, 2026 20:38
@tomazfernandes

Copy link
Copy Markdown
Contributor

@Theprathamshah , thanks for the PR.

Let's keep this PR scoped to SQS, and please open a separate one for Kinesis and other integrations.

@Theprathamshah

Copy link
Copy Markdown
Author

@tomazfernandes Sure let me create separate PR for kinesis.

@Theprathamshah Theprathamshah changed the title feat: auto-configure virtual threads for SQS and Kinesis listener containers feat: auto-configure virtual threads for SQS listener containers Aug 30, 2026
@Theprathamshah
Theprathamshah force-pushed the feature/1693-sqs-virtual-threads branch from 575275d to 30f6289 Compare August 30, 2026 20:51
@Theprathamshah

Copy link
Copy Markdown
Author

@tomazfernandes I've separated the changes as discussed. This PR focuses exclusively on the SQS listener container auto-configuration (the Kinesis changes are in #1696).

Both are ready for review whenever you have time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: sqs SQS integration related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Auto-configure Virtual Threads for SQS/Kinesis Listener Containers

2 participants