I am using NSB 7.4.4 on RabbitMQ and forgot to add the ICommand interface to my class. Surprisingly it worked fine and the handler got the command.
But when I read the documentation you either use the interfaces or add a custom convention.
I haven’t setup any conventions
Why does it work in my case?
Hi Stig!
NServiceBus does allow for messages to be sent and received without either the interface or the conventions being used.
What you can do:
- Send a message
- Receive a message
What you can’t do:
- We require events to be marked properly since that is needed for auto-subscribe to work.
- Explicitly subscribe/unsubscribe to a message not marked as an event
Does that make sense? (I’ll update our documentation accordingly)
Cheers,
Andreas
Great, makes sense. We will keep ICommand to carm my OCD.