Messaging.Primities is a small, independent and decoupled, class library to contain message-oriented abstractions. For the most part this library will only contain interfaces but may contain base classes in the future
A marker interface to provide an event abstraction. An event is a type of message; but a unique event abstraction allows messages and events to be handled separately. An event is the representation of a immutable fact that describes something that occured in the past.
A generic interface that provides an abstrction for something that consumes or handles a message.
IConsumer has a
Handle method to consume a messsage derived from
IMessage and has the signature
void Handle<T>(T message)
A generic interface that provides an abstraction for something that produces a message.
IProducer has a
AttachConsumer method to attach something that implements a
IConsmer so that the producer and send the mesages that are produced to the consumer. This interface promotes the idea that messages are asynchronous and aren't singular. The
AttachConsumer method allows consumers to consume any number of messages that the producer will produce in the future.
A convienient marker interface for something that is both a consumer and a producer, a pipe (or filter). It implements both
IProducer and able to consume a message of one type and produce a method of another type.
A abstraction for a bus that when implemented would faciliate a decoupled architecture whose responsibility is to facilitate the connection of producers and consumers.
For a more indepth introduction to Primitives, please see http://blog.peterritchie.com/Introduction-to-messaging-primitives/