Skip to content

Add caching to default JMS destination resolver #35456

@vpavic

Description

@vpavic

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.

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions