-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: main
Are you sure you want to change the base?
Lower the priority of the EntityType used by ServiceBusTemplate #45417
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the entity type handling in ServiceBusTemplate by lowering the priority of the provided EntityType and ensuring that the producer and consumer factories only override the entity type when it is not already set.
- Change the parameter passed to createProducer and createReceiver in ServiceBusTemplate from defaultEntityType to currentEntityType.
- Update conditional logic in producer and consumer factories to only set the entity type if it isn’t already defined.
- Update CHANGELOG to reflect the bug fix.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/ServiceBusTemplate.java | Update sender and receiver client creation to use currentEntityType |
sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java | Add conditional check for entityType assignment in producer properties |
sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java | Add conditional check for entityType assignment in consumer properties |
sdk/spring/CHANGELOG.md | Update changelog to document the bug fix in entity type priority |
Comments suppressed due to low confidence (1)
sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/ServiceBusTemplate.java:157
- Consider adding unit tests to verify the behavior when entityType is already set in properties versus when it is provided externally, ensuring both sender and receiver use the correct entity type.
public <U> ServiceBusReceivedMessage sendAndReceive(String destination,...
Description
Cherry-pick from #45011 and fix compatibility-tests failures
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines