Skip to content

Commit

Permalink
ensure default rule exists for subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanFeldman committed Jan 23, 2018
1 parent ecd8d18 commit a80ea6c
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -30,6 +30,10 @@ static async Task MainAsync()
topicClient = new TopicClient(ServiceBusConnectionString, TopicName);
subscriptionClient = new SubscriptionClient(ServiceBusConnectionString, TopicName, SubscriptionName);

// Ensure default rule exists
await subscriptionClient.RemoveRuleAsync(RuleDescription.DefaultRuleName);
await subscriptionClient.AddRuleAsync(new RuleDescription(RuleDescription.DefaultRuleName, new TrueFilter()));

Console.WriteLine("======================================================");
Console.WriteLine("Press any key to exit after receiving all the messages.");
Console.WriteLine("======================================================");
Expand Down

0 comments on commit a80ea6c

Please sign in to comment.