简体   繁体   中英

Programitcally Creating Azure Service Bus using Asp.net mvc

I am trying to programmatically create an Azure service bus, however, I am not sure whether it is possible to create or not.

If it is possible, then it would be very much helpful if someone can describe the way in which it can be created.

Currently, I am trying to create it through asp.net MVC.

I would highly recommend creating infrastructure such as Azure Service Bus via automated steps such as from a deployment pipeline (eg from Azure DevOps) using ARM templates or using the Azure CLI if ARM templates are not an option for you. (See here for further documentation on this topic https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-resource-manager-namespace-topic-with-rule )

Although I would usually not recommend it (but then again, I do not know your motives) you can also create namespaces, topics and subscriptions from code. You can find samples here: https://github.com/Azure-Samples/service-bus-dotnet-manage-publish-subscribe-with-basic-features/blob/master/Program.cs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM