Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Hows publishing a message different from just sending it?

different message publishing
0
Posted

Hows publishing a message different from just sending it?

0

While the two may seem almost equivalent, they mean very different things. A lot of conventions have been set up in the infrastructure so that no additional configuration is needed to do either. Treating the two the same will make it difficult for you to have the routing infrastructure “just work”. When sending a message, NServiceBus assumes that you’re a client sending a command or request of sorts to a server. When publishing a message, NServiceBus assumes that you’re a server notifying previously subscribed parties about an event *that’s already happened*. In the case of sending a message, the sender is required to have a entry in its configuration specifying where the message should be sent to. In the case of publishing a message, the publisher is not expected to have that entry in its configuration. Subscribers are the ones that need to have that entry. In short, it’s the different meaning of the message that should guide you.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123