我应该为队列使用哪个 .NET Azure 服务总线库? [英] Which .NET Azure Service Bus library should I use for queues?

查看:33
本文介绍了我应该为队列使用哪个 .NET Azure 服务总线库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft 在 NuGet 上有两个 Azure 服务总线包:

  • WindowsAzure.ServiceBus<块引用>

    将此用于 Microsoft Azure 服务总线队列、主题、EventHub 和中继后端操作.

  • Microsoft.Azure.ServiceBus<块引用>

    这是下一代 Azure 服务总线 .NET 标准客户端库,专注于队列和话题

起初听起来您应该选择 WindowsAzure.ServiceBus.包描述字面上是一个命令,用于使用这个"队列.但 Microsoft.Azure.ServiceBus 称自己为下一代".

GitHub 项目对于 Microsoft.Azure.ServiceBus 也不完全有帮助:自述文件链接到 使用 WindowsAzure.ServiceBus 的代码示例(截至 2020 年 2 月).

解决方案

如博客文章中所述 Azure 服务总线 .NET SDK 的未来现在有三个用于服务总线的 SDK:

  • WindowsAzure.ServiceBus
  • Microsoft.Azure.ServiceBus
  • Azure.Messaging.ServiceBus

Azure.Messaging.ServiceBus 是最新的,最近发布,可在 NuGet.有一些官方示例可用 为它.因此,我建议使用该 SDK,除非您发现其中缺少某些关键功能.要报告错误和请求新功能,请转到 Azure SDK GitHub 主页.

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).

解决方案

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.

这篇关于我应该为队列使用哪个 .NET Azure 服务总线库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆