网站上下文中的NServiceBus Publish()与Send() [英] NServiceBus Publish() vs. Send() in website context

查看:77
本文介绍了网站上下文中的NServiceBus Publish()与Send()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望更好地理解为什么建议不要使用NServiceBus从网站发布消息( NServiceBus文档,向下滚动大约三分之二).

I'm looking to gain a better understanding of why it is recommended to never Publish() messages from a website using NServiceBus (NServiceBus Documentation, scroll about two thirds of the way down).

对Publish()事件和Send()命令是否有意义?如果是这样,我认为Web应用程序可以同时进行Publish()和Send():-)

Doesn't it make semantic sense to Publish() events, and to Send() commands? If so, I think it makes sense that a web application can both Publish() and Send() :-)

此外,考虑到使用Publish()不需要Web应用程序了解消息的收件人(Send()要求Web应用程序配置所有收件人端点),感觉Publish()是一个在许多情况下都是更好的选择,以便您可以任意"将应用程序订阅到消息队列.

Also, given that using Publish() doesn't require the web application to know about the recipients of the messages (Send() requires the web application to have all recipient endpoints configured), it feels like Publish() is a better option for many scenarios so that you can 'arbitrarily' subscribe applications to message queues.

有人对此有强烈的感觉吗?我很想听听您的想法和意见.

Does anyone have strong feelings about this, one way or another? I'd love to hear your thoughts and opinions.

推荐答案

免责声明:我写了这篇博客文章.

Disclaimer: I wrote this blog post.

为什么不从以下位置发布NServiceBus消息一个Web应用程序?

这篇关于网站上下文中的NServiceBus Publish()与Send()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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