Just curious about knowing difference between NserviceBus Message and Command. I did not get any information from google yet.
Thanks for sharing link. I am mostly using command and events so not finding much difference in Command and Message. My quick questions can Message be replaceable to Commands?
are you referring to the
IMessage interfaces? In general we advise to use either commands or events as they are the most common types. Both
ICommand inherit from the
IMessage interface, so this is just a little bit more generic. There are sometimes occasions where neither a command nor a event is the proper description for a message, e.g. when using timeout messages or when sending reply messages. In such cases you can mark these messages just as
IMessage. In general you can use this guidance:
- If you publish a message using the
PublishAPI, it’s an event.
- If you send a message using the
SendAPI, it’s a command.
- If you’re using a different API (e.g.
RequestTimeout) it’s probably just a “message”.