Los Techies : Blogs about software and anything tech!

Simplified MassTransit Configuration


One of the things I've missed since we integrated container support is the ability to quickly and easily create an instance of the ServiceBus. After Ayende agreed, I decided it was time to do something about it.

Behold the minimum amount of code necessary to create a service bus:

Picture 4.png

That's it. In fact, you can easily mock out the container with some nifty Rhino.Mocks usage:

Picture 5.png

I'm starting to convert the tests to use the mocked container approach to reduce the runtime of the tests. But so far the HeavyLoad, Starbucks and WinFormSample samples have been verified to work with the new model. The Windsor facility is also using the new model (Dru is going to update the other two tomorrow).

I'm pretty happy with the new configuration syntax, it certainly makes it easier to setup a bus with zero XML abuse. Look for more of this style of configuration/extension in MT in the near future.

Kick It on DotNetKicks.com
Posted Dec 21 2008, 12:26 AM by Chris Patterson

Comments

Steve wrote re: Simplified MassTransit Configuration
on 12-22-2008 1:01 PM

This looks good, I spent some time this morning, first time looking at Mass Transit, and it's taking me time to sort out how to get a basic sample up and running.

Wtih your code, it look much simplier to do.

Any chance of providing a sample application for download that uses this so I can take a look at how you did it?

Again, it's my first day with it, so I'm making my way around the wiki and code...

Thanks!

Copyright Los Techies 2008, 2009. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems