Microsoft.ServiceBus.Messaging 与 Microsoft.Azure.ServiceBus [英] Microsoft.ServiceBus.Messaging vs Microsoft.Azure.ServiceBus

查看:36
本文介绍了Microsoft.ServiceBus.Messaging 与 Microsoft.Azure.ServiceBus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MS 最近引入了 Microsoft.Azure.ServiceBus 命名空间.
https://github.com/Azure/azure-service-bus/blob/master/samples/readme.md

MS has recently introduced the Microsoft.Azure.ServiceBus namespace.
https://github.com/Azure/azure-service-bus/blob/master/samples/readme.md

它适用于新的 .net 标准 框架(好像 MS 没有足够的半冗余代码库)

It is geared for the new .net standard framework (as if MS doesn't have enough semi-redundant code bases)

我的问题是,它在性能方面能提高多少?

My question is, how much better could it be in terms of performance?

我可以自信地说,Microsoft.ServiceBus.Messaging 有很多不足之处,尤其是在持续接收方面.

I can say with confidence, that the Microsoft.ServiceBus.Messaging leaves lots to be desired, in particular when it comes to persistent receiving.

Microsoft.ServiceBus.Messaging 的一个非常有用的功能是消息泵,它建立在 OnMessage() 方法之上.

A very useful feature of the Microsoft.ServiceBus.Messaging , is the message pump, built on top of OnMessage() method.

新库没有这个,需要在每个收据上重新绑定事件处理程序以保持泵送.绝对是退步了.

The new library, doesn't have this, and needs to rebind event handlers on every receipt to keep pumping. Definitely a step backward .

寻求对两者都有经验并可以进行比较的任何人的反馈..

Looking for feedback from anyone who has had experience with both and can compare..

推荐答案

为了解决您的问题,.netstd 库提供了 .netframework one 中没有的内容:

To address your question, what .netstd library offers that was not in .netframework one:

  1. 开源.新库是完全开源的.您可以浏览、进入(使用下一个版本)而无需设置符号服务器、贡献并简单地查看工作原理.
  2. 与 .netframework 库相反,新库是真正异步的.
  3. 减少了职责和代码大小.例如,MessageBrokeredMessage.您的数据不再由客户端序列化.
  4. 默认为 AMQP,而不是 SBMP.
  5. 新客户端针对 .NET 标准和完整框架.
  6. 重新设计了某些客户端方面以提供更好的选项(OnMessage API 以提供更多失败上下文,插件可扩展性接口以便于测试).
  7. 经过全面测试.
  1. Open Source. The new library is fully open sourced. You can browse, step into (with the next release) without setting up symbols server, contribute, and simply review how things work.
  2. The new library is truly async as oppose to what the .netframework library was.
  3. Reduced amount of responsibilities and code size. For example, Message vs BrokeredMessage. Your data is no longer serialized by the client.
  4. AMQP by default and not SBMP.
  5. The new client targets .NET Standard and Full Framework.
  6. Certain client aspects redesigned to provide better options (OnMessage API to provide more failure context, plugins and extensibility, interfaces for easier testing).
  7. Fully tested.

在性能方面,如果不是更好,它应该与旧客户端相当.

Performance wise it should be on par with the old client if not better.

Microsoft.ServiceBus.Messaging 的一个非常有用的功能是消息泵,它建立在 OnMessage() 方法之上.

A very useful feature of the Microsoft.ServiceBus.Messaging , is the message pump, built on top of OnMessage() method.

您仍然拥有 OnMessage API,但已重命名为 RegisterMessageHandler.

You still have OnMessage API, though renamed to RegisterMessageHandler.

这篇关于Microsoft.ServiceBus.Messaging 与 Microsoft.Azure.ServiceBus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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