网站上下文中的 NServiceBus Publish() 与 Send()
我希望更好地理解为什么建议不要使用 NServiceBus 从网站发布()消息(NServiceBus 文档,向下滚动大约三分之二)。
它对于 Publish() 事件和 Send() 命令没有语义意义吗?如果是这样,我认为 Web 应用程序可以同时使用 Publish() 和 Send() :-)
另外,考虑到使用 Publish() 不需要 Web 应用程序了解消息的收件人 (Send( )要求 Web 应用程序配置所有接收端点),对于许多场景来说,感觉 Publish() 是更好的选择,以便您可以“任意”将应用程序订阅到消息队列。
有人对此有强烈的感受吗?我很想听听您的想法和意见。
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).
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() :-)
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
免责声明:我写了这篇博文。
为什么不从 Web 应用程序发布 NServiceBus 消息?
Disclaimer: I wrote this blog post.
Why not publish NServiceBus messages from a web application?