Ayende @ Rahien

It's a girl

Subscriptions: Mass Transit vs. NServiceBus vs. Rhino ServiceBus

For a pub / sub system, managing subscriptions could be classified as important. All three service buses has some notion, subscriptions are important. I find it interesting to trace the way that each of them is handling this scenario differently.

NServiceBus deal with this as a pluggable strategy. NServiceBus tend to do things that way :-)

The two options that come out of the box with it are database backed subscription storage or a queue backed subscription storage. Just to make things interesting, for queue backed subscription storage, you now have several deployment options at your hand (private subscription storage per endpoint, shared subscription queue, etc).

Mass Transit handle this by treating subscriptions as a service. Again, we have the option to chose between either a subscription storage based on distributed cache (memcached) or a local service running it. In both cases, we are talking about having a well known place to go looking for it.

I don't think that I like this very much, mainly because if you miss that, you get into some very strange situations. (Nothing works, and the first time that this happens, you don't know why).

For Rhino Service Bus, I choose to go with a private subscription storage. That is, each end point store its own subscription directly on the queue that it is using to accept messages. That means that I have only a single place to look for in order to understand how this endpoint is behaving. It also means that I literally have to do nothing in order to start getting messages flowing.

Comments

Jose
12/18/2008 10:07 AM by
Jose

Is Rhino Service Bus open source? If so, does it have a public source repository? I think it would be very interesting to follow your development.

Jeremie.Chassaing
12/18/2008 12:23 PM by
Jeremie.Chassaing

Do you use sub queues to store subscriptions ?

Jose
12/19/2008 11:53 AM by
Jose

Stefan,

thanks! I don't know how I missed it. :(

Scott White
12/19/2008 05:05 PM by
Scott White

I'm considering ActiveMQ which is JMS based and has .Net APIs. Spring.Net even provides a framework into it, what do you think about it?

Ayende Rahien
12/20/2008 07:13 AM by
Ayende Rahien

Scott,

ActiveMQ has the explicit notion of pub/sub, rather than what we do with msmq, build on top of that.

I haven't done much with it except playing with it, so I can't really say.

Hadi
12/20/2008 09:39 AM by
Hadi

It'd be a good idea to add BeforeClose and AfterClose methods (like Before/After start) to the Bootstrapper. Allows me to cleanup additional resources when the host goes down.

Thanks for this great framework. It IS really easier to use and configure.

Julian Birch
12/22/2008 12:54 PM by
Julian Birch

Although undoubtedly a good way of doing it, it's rather dependent on the design of your messaging system. You require an MSMQ4 transport, which restricts you to... well, no machines in my current work environment. :(

Ayende Rahien
12/22/2008 12:59 PM by
Ayende Rahien

Julian,

Not quite. The same approach work with actual queues, and there was a patch submitted that make RSB works with MSMQ 3

Comments have been closed on this topic.