Add ability to manage rules with the ServiceBusReceiver
Description
Add new async client responsible for managing rules for a specific topic subscription. The rule manager requires only Listen claims, whereas the ServiceBusAdministrationAsyncClient requires Manage claims. Addresses https://github.com/Azure/azure-sdk-for-java/issues/27711
All SDK Contribution checklist:
- [x] The pull request does not introduce [breaking changes]
- [x] CHANGELOG is updated for new features, bug fixes or other significant changes.
- [x] I have read the contribution guidelines.
General Guidelines and Best Practices
- [x] Title of the pull request is clear and informative.
- [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
Testing Guidelines
- [x] Pull request includes test coverage for the included changes.
API change check
APIView has identified API level changes in this PR and created following API reviews.
@srnagar , can you take a look at the API view for this? .NET, JS have shipped their RuleManagers.. so we're trying to ship the same experience.
@ki1729 can you please review this SB pr?
Hey @JonathanGiles ,could you please take a look at the API view for this? .NET, JS have shipped their RuleManagers.. so we're trying to ship the same experience.
Hey @JonathanGiles ,could you please take a look at the API view for this? .NET, JS have shipped their RuleManagers.. so we're trying to ship the same experience.
I've left one comment for your consideration. Could you also please share a link to the .NET equivalent API, so that I may compare? Thanks.
@JonathanGiles Thank you, and here is .net related information: .NET issue - https://github.com/Azure/azure-sdk-for-net/issues/25523 .NET PR - https://github.com/Azure/azure-sdk-for-net/pull/27346 class file - https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs
Why is the API in Java createRule and deleteRule and in .NET it is addRule and removeRule? Is there precedence that we are following here? It seems that what we have in Java is consistent internally at least.
Why is the API in Java
createRuleanddeleteRuleand in .NET it isaddRuleandremoveRule? Is there precedence that we are following here? It seems that what we have in Java is consistent internally at least.
Sorry, I forgot to add the latest PR https://github.com/Azure/azure-sdk-for-net/pull/29407 , in this PR , .net change addRule and removeRule to createRule and deleteRule.
Hi @JonathanGiles , I added another PR above to explain why using the createRule and deleteRule, here is the source code of the rule manager : https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs you can compare the final version, in case that .NET did some change after the first PR.
This looks good to me. I left one API comment, and I would like to make sure the Service Bus Java folks are all happy with this too before I hit approve. Thanks!
Jonathon suggest use List in api.dev, refer to other api which return flux in async client, they return IterableStream in sync client, so I return IterableStream instead of List.
@ki1729 @conniey @anuchandy Please take a look again, if all is OK, I can ask @JonathanGiles approve this PR.
Hi @JonathanGiles , I improve the tests following Connie's comments. Could you please take a look again? Thank you!