-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
The default JMS DestinationResolver
implementation used by Spring Framework, DynamicDestinationResolver
, doesn't implement CachingDestinationResolver
and therefore doesn't cache the resolved destinations. This can have significant performance implications in cases where JMS provider does some expensive work in their jakarta.jms.Session#createQueue
/#createTopic
implementations and/or with high-volume workloads.
Since resolved destinations should typically be stable, and Framework in some places already refreshes destination cache on critical failures if working with CachingDestinationResolver
, it seems safe to have a default JMS DestinationResolver
implementation that caches the results.
At the very least, Spring Framework could provide CachingDestinationResolver
implementation that wraps other DestinationResolver
implementation and caches the results (analogous to the org.springframework.messaging.core.CachingDestinationResolverProxy
), and (hopefully) use that as the new default implementation.
If you would consider such contribution, I can provide a PR along these lines shortly.