Skip to content

Implmentations of Missing Dotnet Core Azure Service Bus functionality around Queues/Topics/Subsccriptions/Event Hubs

License

Notifications You must be signed in to change notification settings

Mossharbor/AzureWorkArounds.ServiceBus

Repository files navigation

Mossharbor.AzureWorkArounds.ServiceBus

The last version of the Azure Service Bus Api's (Microsoft.Azure.ServiceBus) are missing functionality that used to exist in the non-dotnet core libaries (mainly WindowsAzure.ServiceBus).
This missing functionality involves the CRUD operations on Azure Queue's/Topics/Subscriptions and Event Hubs.

This library adds those operations back in a donet standard 2.0 compatible library.

you can see a discussion of the issue here

Install the nuget package: Install-Package Mossharbor.AzureWorkArounds.ServiceBus

Example:

string name = "testSubscription";
string topicName = "testTopicSubscription";
NamespaceManager ns = NamespaceManager.CreateFromConnectionString(serviceBusConnectionString);
TopicDescription tdescription = ns.CreateTopic(topicName);
SubscriptionDescription sdescription = ns.CreateSubscription(topicName, "testSubscription");

if (!ns.SubscriptionExists(topicName, name, out sdescription))
	 Assert.Fail("Subscription did not exist");
else
{
	Assert.IsTrue(null != sdescription);
	ns.DeleteSubscription(topicName, name);
	if (ns.SubscriptionExists(topicName, name, out sdescription))
		 Assert.Fail("Subscription was not deleted");

	ns.DeleteTopic(topicName);
	if (ns.TopicExists(name, out tdescription))
		Assert.Fail("Topic was not deleted");
}

About

Implmentations of Missing Dotnet Core Azure Service Bus functionality around Queues/Topics/Subsccriptions/Event Hubs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages