Add support for caching JMS Queue objects #259
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds support for caching
jakarta.jms.Queueobjects created bySQSSession#createQueuein order to avoid excessive calls to SQS API to resolve queue URL. The caching is disabled by default and is configurable usingProviderConfiguration.@ziyanli-amazon could you please review this? This change provides option for significant optimization in high-volume workloads with Spring's
DynamicDestinationResolverand 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.