问题
Microsoft has two Azure Service Bus packages on NuGet:
- WindowsAzure.ServiceBus
Use this for Microsoft Azure Service Bus Queues, Topics, EventHub and Relay backend operations.
- Microsoft.Azure.ServiceBus
This is the next generation Azure Service Bus .NET Standard client library that focuses on queues & topics
At first it sounds like you should pick WindowsAzure.ServiceBus
. The package description is literally a command to "use this" for queues. But Microsoft.Azure.ServiceBus
calls itself "the next generation."
The GitHub project for Microsoft.Azure.ServiceBus doesn't exactly help matters, either: The README links to code samples that use WindowsAzure.ServiceBus (as of February 2020).
回答1:
As explained in the blog post The future of Azure Service Bus .NET SDK there are now three SDKs for Service Bus:
- WindowsAzure.ServiceBus
- Microsoft.Azure.ServiceBus
- Azure.Messaging.ServiceBus
Azure.Messaging.ServiceBus, which is the newest one, was recently released and is available on NuGet. There are some official samples available for it. Therefore I recommend using that SDK unless you find there is some critical functionality you need missing in it. To report bugs and request new functionality go to the Azure SDK GitHub home.
来源:https://stackoverflow.com/questions/60283148/which-net-azure-service-bus-library-should-i-use-for-queues