Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Format;
# groupId:artifactId;dependency-version
ch.qos.logback:logback-classic;1.3.14
com.azure:azure-servicebus-jms;2.0.0
com.azure:azure-servicebus-jms;2.1.0
com.azure.tools:azure-autorest-customization;1.0.0-beta.11
com.fasterxml:aalto-xml;1.3.3
com.fasterxml.jackson.core:jackson-annotations;2.18.4
Expand Down
4 changes: 2 additions & 2 deletions sdk/spring/spring-cloud-azure-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-servicebus-jms</artifactId>
<version>2.0.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} -->
<version>2.1.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} -->
<optional>true</optional>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -542,7 +542,7 @@
<rules>
<bannedDependencies>
<includes>
<include>com.azure:azure-servicebus-jms:[2.0.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} -->
<include>com.azure:azure-servicebus-jms:[2.1.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} -->
<include>com.mysql:mysql-connector-j:[9.4.0]</include> <!-- {x-include-update;springboot3_com.mysql:mysql-connector-j;external_dependency} -->
<include>com.fasterxml.jackson.core:jackson-annotations:[2.19.2]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} -->
<include>com.fasterxml.jackson.core:jackson-core:[2.19.2]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-core;external_dependency} -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,31 @@ void useCacheConnectionViaAdditionConfigurationFile(String pricingTier) {
});
}

@ParameterizedTest
@ValueSource(strings = { "standard", "premium" })
void cachingConnectionFactoryCachesProducersAndConsumersForSameDestination(String pricingTier) {
this.contextRunner
.withPropertyValues(
"spring.jms.servicebus.pricing-tier=" + pricingTier,
"spring.jms.servicebus.pool.enabled=false",
"spring.jms.cache.producers=true",
"spring.jms.cache.consumers=true"
)
.run(context -> {
assertThat(context).hasSingleBean(CachingConnectionFactory.class);
CachingConnectionFactory cachingFactory = context.getBean(CachingConnectionFactory.class);
// Verify that producer and consumer caching is enabled
// When these properties are true, CachingConnectionFactory will cache and reuse
// MessageProducer and MessageConsumer instances for the same destination
assertThat(cachingFactory.isCacheProducers())
.as("CachingConnectionFactory should cache MessageProducers for the same destination")
.isTrue();
assertThat(cachingFactory.isCacheConsumers())
.as("CachingConnectionFactory should cache MessageConsumers for the same destination")
.isTrue();
});
}

@Configuration
@PropertySource("classpath:servicebus/additional.properties")
static class AdditionalPropertySourceConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-servicebus-jms</artifactId>
<version>2.0.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} -->
<version>2.1.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} -->
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
Expand Down