Skip to content

Commit 17f6e57

Browse files
authored
Merge pull request #195110 from spelluru/newfiltersample2
TrueRule filter
2 parents a0c0316 + 2b02355 commit 17f6e57

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/service-bus-messaging/service-bus-filter-examples.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ It's equivalent to: `sys.ReplyTo = '[email protected]' AND sys.Label = 'Import
103103
Here's a .NET C# example that creates the following Service Bus entities:
104104

105105
- Service Bus topic named `topicfiltersampletopic`
106-
- Subscription to the topic named `AllOrders` with a SQL filter expression `1=1`
106+
- Subscription to the topic named `AllOrders` with a True Rule filter, which is equivalent to a SQL rule filter with expression `1=1`.
107107
- Subscription named `ColorBlueSize10Orders` with a SQL filter expression `color='blue' AND quantity=10`
108108
- Subscription named `ColorRed` with a SQL filter expression `color='red'` and an action
109109
- Subscription named `HighPriorityRedOrders` with a correlation filter expression `Subject = "red", CorrelationId = "high"`
@@ -145,11 +145,13 @@ namespace CreateTopicsAndSubscriptionsWithFilters
145145
Console.WriteLine($"Creating the topic {topicName}");
146146
await adminClient.CreateTopicAsync(topicName);
147147

148-
Console.WriteLine($"Creating the subscription {subscriptionAllOrders} for the topic with a SQL filter ");
149-
// Create a SQL filter with an expression that always evaluates to true
148+
Console.WriteLine($"Creating the subscription {subscriptionAllOrders} for the topic with a True filter ");
149+
// Create a True Rule filter with an expression that always evaluates to true
150+
// It's equivalent to using SQL rule filter with 1=1 as the expression
150151
await adminClient.CreateSubscriptionAsync(
151152
new CreateSubscriptionOptions(topicName, subscriptionAllOrders),
152-
new CreateRuleOptions("AllOrders",new SqlRuleFilter("1=1")));
153+
new CreateRuleOptions("AllOrders", new TrueRuleFilter()));
154+
153155

154156
Console.WriteLine($"Creating the subscription {subscriptionColorBlueSize10Orders} with a SQL filter");
155157
// Create a SQL filter with color set to blue and quantity to 10

0 commit comments

Comments
 (0)