Skip to content

Commit

Permalink
Check if Topic Exists before creation Subscription BrighterCommand#1444
Browse files Browse the repository at this point in the history
  • Loading branch information
preardon committed Mar 19, 2021
1 parent 564c458 commit 8d9fff7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ public void CreateSubscription(string topicName, string subscriptionName, int ma
{
Logger.Value.Info($"Creating subscription {subscriptionName} for topic {topicName}...");

if (!TopicExists(topicName))
{
CreateTopic(topicName);
}

var subscriptionDescription = new SubscriptionDescription(topicName, subscriptionName)
{
MaxDeliveryCount = maxDeliveryCount
Expand Down

0 comments on commit 8d9fff7

Please sign in to comment.