1. Anton Gogolev
  2. octalforty-mechanic

Overview

octalforty Mechanic

Nice and simple lighweight embeddable message bus for .NET. Four lines of code

var messageBus = new MessageBus {
  MessageStore = new FsMessageStore(@"d:\mechanic") { 
    MessageSerializer = new JsonMessageSerializer() }         
};

...and you're good to go:

messageBus.Subscribe(MyFirstMessageHandler);
messageBus.Subscribe(new MySecondMessageHandler());
messageBus.Subscribe<MyThirdMessage>(m => Console.WriteLine("MyThirdMessage"));

messageBus.Publish(new MyFirstMessage());
messageBus.Publish(new MySecondMessage());
messageBus.Publish(new MyThirdMessage());

Why Mechanic?

It doesn't tell you what to do and how to do it. Rather, it stays out of the way as much as possible and does only one job, which is sending and receiving messages. You can bend it to your will to use NHibernate or Entity Framework to store messages, serialize them to JSON, BSON, XML or anything you want, use local or distributed transactions and your favorite IoC/DI ontainer.

How to get it?

octalforty Mechanic is available in NuGet feed:

nuget install octalforty.mechanic

Alternatively, download binaries and source code from "Downloads" page.