Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Revise DefaultMessageListenerContainer for first-class virtual thread support #32252

Closed
jhoeller opened this issue Feb 13, 2024 · 0 comments
Closed
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

DefaultMessageListenerContainer and its base class AbstractJmsListeningContainer use synchronization for lifecycle and shared connection management. This can be replaced with ReentrantLock in order to improve virtual thread compatibility during the startup and shutdown phase. The message receive step is executing outside of a lock, so general virtual thread compatibility is given already.

Since DefaultMessageListenerContainer internally creates a SimpleAsyncTaskExecutor by default, an explicit virtual thread setup option it is also worth considering, e.g. a setVirtualThreads flag to simply pass through to the internal SimpleAsyncTaskExecutor instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant