Use dedicated JMS listener connection factory#49833
Open
arnabnandy7 wants to merge 4 commits into
Open
Conversation
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
arnabnandy7
requested review from
a team,
moarychan,
rujche and
saragluna
as code owners
July 15, 2026 23:00
Contributor
|
Thank you for your contribution @arnabnandy7! We will review the pull request and get back to you soon. |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 32 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Service Bus JMS auto-configuration so that when spring.jms.servicebus.pool.enabled=true and spring.jms.cache.enabled=false, the sender continues to use JmsPoolConnectionFactory while listener containers use a dedicated native ServiceBusJmsConnectionFactory (enabling Standard-tier topic subscriptions).
Changes:
- Updated the listener-container connection factory decision table to select
ServiceBusJmsConnectionFactoryforpool=true+cache=false. - Added an auto-configuration test covering the
pool=true+cache=falsecase across Standard and Premium tiers. - Updated the Spring module CHANGELOG connection-factory tables to reflect the corrected behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java | Adds a new parameterized test verifying listener containers use a native/dedicated connection factory when pooling is enabled and caching is disabled. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsContainerConfiguration.java | Adjusts the listener container decision table so pool=true + cache=false yields ServiceBusJmsConnectionFactory. |
| sdk/spring/CHANGELOG.md | Updates the documented decision tables to match the new listener container behavior. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes the Service Bus JMS connection factory configuration so applications can use:
JmsPoolConnectionFactoryfor sending messages.ServiceBusJmsConnectionFactoryfor listener containers.This combination is selected by configuring:
Previously, this property combination caused both the sender and listener containers to use JmsPoolConnectionFactory. This prevented Standard-tier Service Bus topic subscriptions from using the native ServiceBusJmsConnectionFactory.
The listener connection factory decision table now selects a dedicated ServiceBusJmsConnectionFactory for this combination, while the sender continues to use JmsPoolConnectionFactory.
The change includes tests for both Standard and Premium Service Bus tiers. The tests verify that queue and topic listener containers share the dedicated native connection factory and do not use the pooled sender connection factory.
The corresponding connection factory tables in the CHANGELOG have also been updated.
Fixes: #49308
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines