Closed
Description
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.