Feb 16

Do I Need Message Prioritisation?

Tag: SOASymon Rottem @ 11:56 am

For a while now I’ve been working on modelling a service based application that accepts messages and sends them to a set of processing services that are spread across several hosts. One of the requirements is that the application should be able to provide different service level agreements for some message originators.

Since this looked like an Service Oriented Architecture (SOA) I started looking at an Enterprise Service Bus (ESB) to standardize the model for communicating between the applications, provide publish-subscribe semantics and allow me to abstract away the underlying message transport system.

At just the right moment Udi Dahan announced that he was releasing NServiceBus, his ESB implementation for .NET, so I started playing around with it. It’s OSS and written in C# but it was pretty new at the time I started looking at it so there wasn’t much documentation available. Regardless, it looked like a good fit so I rolled up my sleeves and started rummaging around in the source and playing with it…and it still looks like a good fit.

Everything seemed to be going well with the solution design until I looked at the SLA requirement and discovered that NServiceBus doesn’t have any notion of message priority. Since my initial approach had taken me toward using MSMQ as the underlying transport and MSMQ has some basic message priority support I thought I’d be able to use it from NServiceBus, but apparently not. A possible workaround was to implement separate queues for separate priorities but since MSMQ for the versions of Windows I’m targeting doesn’t provide remote transactional read it would be necessary to implement dispatchers and the proliferation of queues was starting to look pretty daunting.

So, next stop was to ask Udi so I dropped him an email. After a reasonably lengthy thread where he essentially suggested that trying to use priority in a queuing environment is probably not a great idea for several reasons he said he’d like to think further about the problem. Imagine my surprise and pleasure when he responded with a podcast entitled “Message Priority – You Aren’t Gonna Need It” in which he dedicated 20 minutes to provide further guidance.

His response was well worth listening to and answered a lot of the questions that had been banging around in my head but, as with most of Udi’s podcasts, it raised a whole new set of questions. The net result is that NServiceBus may still work for me but I think I need to start examining other message transports to find an easier path to my solution.

Now I find myself trying to wrap my head around space-based architectures and am looking for a .NET based implementation – if anyone knows of one please post me a comment.

Related Posts