rebus-org / Rebus.AzureServiceBus

:bus: Azure Service Bus transport for Rebus
https://mookid.dk/category/rebus
Other
33 stars 20 forks source link

EnsureTopicExists and GetOrCreateSubscription implementation could be improved #44

Closed sabbadino closed 4 years ago

sabbadino commented 4 years ago

Hi , I had a look at the implementation of EnsureTopicExists : I suggest to use TopicExistsAsync. This would avoid to generate many exceptions (which clutter my application insights logs :) btw).

Same goes for the implementation of method GetOrCreateSubscription : you could use SubscriptionExistsAsync

InnerCreateQueue is fine : it uses QueueExistsAsync

Thank you enrico

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.servicebus.management.managementclient.topicexistsasync?view=azure-dotnet#Microsoft_Azure_ServiceBus_Management_ManagementClient_TopicExistsAsync_System_String_System_Threading_CancellationToken_

mookid8000 commented 4 years ago

Fixed in the more recent versions – Rebus.AzureServiceBus 7.0.0-a19 is on NuGet.org now 🙂