Azure / Azure/azure-sdk-for-rust
[Service Bus] Add a rule manager for subscriptions
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 109
Description
## Summary
There is no way to manage subscription rules. Filters and actions cannot be created, listed, or deleted.
## Motivation
`ServiceBusRuleManager` is a data plane surface over the subscription `$management` node, and it needs only Listen claims. The administration client needs Manage claims. Rules are therefore reachable long before any HTTP administration client exists, which makes this the cheapest large feature in the graph.
The rule model needs four filters and one action. .NET nests them, because `TrueRuleFilter` and `FalseRuleFilter` derive from `SqlRuleFilter`. Service Bus encodes the true filter and the false filter as their own AMQP described types, so a flat Rust enum matches the wire better than the C# hierarchy does.
## Proposal
- Implement `com.microsoft:add-rule`, `com.microsoft:remove-rule`, and `com.microsoft:enumerate-rules`.
- Model the filter as a flat enum over the SQL filter, the correlation filter, the true filter, and the false filter.
- Model the action as the SQL rule action.
- Note that .NET has no update, get, or exists operation on the rule manager, so do not invent one here.
## Dependencies
Blocked by:
- #4936 [AMQP] Management client cannot send a typed request body or read the status fields
Sub-issue of #4934.
Contributor guide
Research direction
Start with the ServiceBusRuleManager surface and the subscription $management node, then review blocked issue #4936 for the typed request and status-field support. Done means implementing add-rule, remove-rule, and enumerate-rules with the four filter variants and SQL rule action, without adding update, get, or exists operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100