Skip to content

Lower the priority of the EntityType used by ServiceBusTemplate #45417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 3 additions & 11 deletions sdk/spring/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
# Release History
# (Unreleased)
Upgrade Spring Boot dependencies version to 3.4.4 and Spring Cloud dependencies version to 2024.0.1

## 5.22.0-beta.1 (Unreleased)

### Spring Cloud Azure Autoconfigure
This section includes changes in `spring-cloud-azure-autoconfigure` module.

#### Features Added
- Register a new bean `ServiceBusConsumerFactory` to support request-reply pattern of `ServiceBusTemplate`.
## 5.23.0-beta.1 (Unreleased)

### Spring Messaging Azure Service Bus
This section includes changes in the `spring-messaging-azure-servicebus` module.

#### Features Added
- `ServiceBusTemplate` supports request-reply pattern.
#### Bugs Fixed
- Lower the priority of the `EntityType` used by `ServiceBusTemplate`.

## 5.22.0 (2025-04-08)
- This release is compatible with Spring Boot 3.4.0-3.4.4, 3.3.0-3.3.10, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.4.x (x>4), 3.3.y (y>10) and 3.2.z (z>12) should be supported, but they aren't tested with this release.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ServiceBusSessionReceiverClient createReceiver(String name) {
public ServiceBusSessionReceiverClient createReceiver(String name, ServiceBusEntityType entityType) {
ConsumerProperties consumerProperties = this.propertiesSupplier.getProperties(new ConsumerIdentifier(name)) != null
? this.propertiesSupplier.getProperties(new ConsumerIdentifier(name)) : new ConsumerProperties();
if (entityType != null) {
if (consumerProperties.getEntityType() == null && entityType != null) {
consumerProperties.setEntityType(entityType);
}
return doCreateReceiver(name, consumerProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public ServiceBusSenderAsyncClient createProducer(String name) {
public ServiceBusSenderAsyncClient createProducer(String name, ServiceBusEntityType entityType) {
ProducerProperties producerProperties = this.propertiesSupplier.getProperties(name) != null
? this.propertiesSupplier.getProperties(name) : new ProducerProperties();
if (entityType != null) {
if (producerProperties.getEntityType() == null && entityType != null) {
producerProperties.setEntityType(entityType);
}
return doCreateProducer(name, producerProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public <U> ServiceBusReceivedMessage sendAndReceive(String destination,
LOGGER.debug("Provided reply-to session id ‘{}’ for entity '{}', it should be unique.", replyToSessionId, destination);
}

ServiceBusSenderAsyncClient senderAsyncClient = this.producerFactory.createProducer(destination, defaultEntityType);
ServiceBusSenderAsyncClient senderAsyncClient = this.producerFactory.createProducer(destination, currentEntityType);
senderAsyncClient.sendMessage(serviceBusMessage).block(sendTimeout);

ServiceBusSessionReceiverClient sessionReceiver = consumerFactory.createReceiver(replyDestination, currentEntityType);
Expand Down
Loading