amazon-sqs-java-messaging-lib icon indicating copy to clipboard operation
amazon-sqs-java-messaging-lib copied to clipboard

Add support for caching JMS Queue objects

Open vpavic opened this issue 3 months ago • 0 comments

This commit adds support for caching jakarta.jms.Queue objects created by SQSSession#createQueue in order to avoid excessive calls to SQS API to resolve queue URL. The caching is disabled by default and is configurable using ProviderConfiguration.


@ziyanli-amazon could you please review this? This change provides option for significant optimization in high-volume workloads with Spring's DynamicDestinationResolver and was inspired by similar logic in ActiveMQ Artemis: https://github.com/apache/activemq-artemis/blob/9d75881e31e110cc656127ff68477f09a036e9ef/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java#L578-L588

I didn't add the tests for caching logic yet (hence opening this as draft), just made sure everything builds fine with the existing defaults. If you consider this a useful change I'll proceed to add the needed tests.

vpavic avatar Sep 10 '25 11:09 vpavic