Add possibility to add a SqlFilter to Azure ServiceBus subscription
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
I'm trying to add a SqlFilter to a subscription on a topic, but while the AzureServiceBusRule do have a FilterType property that you can set to AzureServiceBusFilterType.SqlFilter, it doesn't seem to have an actual property to set the value of the filter itself, only CorrelationFilter does exist.
### Describe the solution you'd like
I'd expect something like this to be possible
```
var topic = serviceBus.AddServiceBusTopic("myTopic");
topic.AddServiceBusSubscription("mySubscription")
.WithProperties(subscription =>
{
subscription.MaxDeliveryCount = defaultMaxDeliveryCount;
subscription.RequiresSession = true;
var rule = new AzureServiceBusRule($"mySubscription-filter");
rule.FilterType = AzureServiceBusFilterType.SqlFilter;
rule.SqlFilter = "action = myAction"
subscription.Rules.Add(rule);
});
```
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.