ISubscriptionClient.AddRuleAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddRuleAsync(RuleDescription) |
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription. |
AddRuleAsync(String, Filter) |
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription. |
AddRuleAsync(RuleDescription)
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
public System.Threading.Tasks.Task AddRuleAsync (Microsoft.Azure.ServiceBus.RuleDescription description);
abstract member AddRuleAsync : Microsoft.Azure.ServiceBus.RuleDescription -> System.Threading.Tasks.Task
Public Function AddRuleAsync (description As RuleDescription) As Task
Parameters
- description
- RuleDescription
The rule description that provides the rule to add.
Returns
A task instance that represents the asynchronous add rule operation.
Remarks
You can add rules to the subscription that will decide filter which messages from the topic should reach the subscription. A default TrueFilter rule named DefaultRuleName is always added while creation of the Subscription. You can add multiple rules with distinct names to the same subscription. Multiple filters combine with each other using logical OR condition. i.e., If any filter succeeds, the message is passed on to the subscription.
Applies to
AddRuleAsync(String, Filter)
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
public System.Threading.Tasks.Task AddRuleAsync (string ruleName, Microsoft.Azure.ServiceBus.Filter filter);
abstract member AddRuleAsync : string * Microsoft.Azure.ServiceBus.Filter -> System.Threading.Tasks.Task
Public Function AddRuleAsync (ruleName As String, filter As Filter) As Task
Parameters
- ruleName
- String
- filter
- Filter
The filter expression against which messages will be matched.
Returns
A task instance that represents the asynchronous add rule operation.
Remarks
You can add rules to the subscription that will decide filter which messages from the topic should reach the subscription. A default TrueFilter rule named DefaultRuleName is always added while creation of the Subscription. You can add multiple rules with distinct names to the same subscription. Multiple filters combine with each other using logical OR condition. i.e., If any filter succeeds, the message is passed on to the subscription.