Leggere in inglese

Condividi tramite


SubscriptionClient.AddRuleAsync Method

Definition

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)

Source:
SubscriptionClient.cs

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);

Parameters

description
RuleDescription

The rule description that provides the rule to add.

Returns

A task instance that represents the asynchronous add rule operation.

Implements

Remarks

You can add rules to the subscription that decides 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)

Source:
SubscriptionClient.cs

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);

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.

Implements

Remarks

You can add rules to the subscription that decides 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. Max allowed length of rule name is 50 chars.

Applies to