NServiceBus: DRY with unobtrusive conventions

Many times when working with NServiceBus in unobtrusive mode you may feel that you are repeating the same conventions over and over again on all the endpoints.

The IWantToRunBeforeConfiguration interface is a great help in order to embrace the DRY principle.

Just define your implementation in an assembly referenced by all the endpoints:

1
2
3
4
5
6
7
8
9
10
11
12
13
public class UnobtrusiveConventions : IWantToRunBeforeConfiguration
{
public void Init()
{
Configure.Instance
.DefiningCommandsAs(t => t.Namespace != null
&& t.Namespace.EndsWith("Commands"))
.DefiningEventsAs(t =>; t.Namespace != null
&& t.Namespace.EndsWith("Events"))
.DefiningMessagesAs(t => t.Namespace != null
&& t.Namespace.EndsWith("Messages"));
}
}

and NServiceBus will pick this class automatically for each endpoint.

Share Comments

NServiceBus Training

I will be giving the Udi Dahan‘s Enterprise Development with NServiceBus 4-day course in Spain at:

More info at: http://udidahan.com/2012/10/12/training-for-this-winter/

Share Comments

Cassandra on Azure CentOS VM

Having some fun with Cassandra lately I wanted to figure out how to setup a working environment on the new Windows Azure VM roles, so I decided to give a try and install a Cassandra cluster on CentOS.

Although it’s on Ubuntu, the following article is a good guide that helped me to configure a Linux cluster: https://www.windowsazure.com/en-us/manage/linux/other-resources/how-to-run-cassandra-with-linux/

We create the 1st VM assigning a pem certificate in order to get access by ssh:

Read More

Share Comments

UI Composition for Services

One of the most important concepts when applying either SOA or DDD is the definition of Services (or Bounded Contexts in the DDD lingo).

Each of these services will be responsible for its own data and behavior and could also own the UI components of that service.

Let’s see an example with the typical Ecommerce domain:

Read More

Share Comments

Welcome to my blog

I want to welcome you to my blog!

I’d like to share with you my ramblings on various topics that I’m interested in:

  • Distributed systems
  • SOA
  • DDD
  • NoSQL
  • Agile
  • …and many more!!

You can also visit my blog in spanish language at: http://www.serrate.es

Hope to see you here!

Share