Solutions    |    Downloads    |    License    |    Documentation    |    Training    |    Support    |    Customers    |    About Us

Introducing IEvent And ICommand

Last Updated: Jan 23, 2013 08:39AM IST

One of the new features in NServiceBus v3 is the introduction of two new message interfaces, IEvent and ICommand. The purpose is to capture more of the intent of the messages that you as a user are defining. This will help NServiceBus to enforce messaging best practices and stop you from doing crazy things:)

Messages implementing ICommand

  • Is not allowed to be published since all commands should have one logical owner and should be sent to the endpoint responsible for processing
  • Can’t be subscribed and unsubscribed to
  • Can’t implement IEvent

Messages implementing IEvent

  • Can be published
  • Can be subscribed and unsubscribed to
  • Can’t be sent using Bus.Send() since all events should be Published
  • Can’t implement ICommand
  • Can’t be sent using the gateway, ie bus.SendToSites()

So please go ahead and use those additional interfaces if you wan’t NServiceBus to help you fall into the pit of success.

See the Unobtrusive sample for other information on how specify what's a command and/or an event.

About NServiceBus    |    Contact Us    |    Privacy    |    Follow us on:   
Copyright 2010-2013 NServiceBus. All rights reserved
NSB_Y@yahoo.com
http://assets1.desk.com/r1046ffeaa2233e531563a32d7edef6677d8a78b5/javascripts/
nservicebus
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
true
Invalid characters found
/customer/portal/articles/autocomplete
There was an error contacting Get Satisfaction
View All
0
discussions
replies
Questions
Ideas
Problems
Praise