NServiceBus Publish() vs. Send() in website context

你。 提交于 2019-12-20 18:33:44

问题


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.


回答1:


Disclaimer: I wrote this blog post.

Why not publish NServiceBus messages from a web application?



来源:https://stackoverflow.com/questions/4672160/nservicebus-publish-vs-send-in-website-context

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!