Monday, 31 August 2009

RabbitMQ library update

I've commited an upgrade to the RabbitMQ libraries in Mono to version 1.6 bringing Mono in line with the latest from the RabbitMQ team.

I've been working on a couple of other pieces, mostly a reworking of the MessageQueue integration code in order to have Connection objects hang onto AMQP channels. Currently a new connection to the AMQP server is created for each request, which will obviously have an impact on latency. I'm holding off committing this work for now as I want to use .NET 2.0 features which will be easier post the 2.6 release.

Sunday, 19 July 2009

Documents, Config and Minor Changes

After spending the last month or so of find a job and moving into a new flat in London I am back working on the messaging integration for Mono. I've mostly been working on some small clean ups and adding support for configuring the provider using System.Configuration for clients that are using a .NET 2.0 profile or later. To set the messaging provider using System.Configuration, create your config file 'yourapp.exe.config' and include the following:

<?xml version="1.0" encoding="utf-8" ?>
<add key="MONO_MESSAGING_PROVIDER" value="rabbitmq"/>

I have also allows the shortened value 'rabbitmq' as an acceptable value when using the environment variable.

The System.Messaging docs on the Mono wiki have also been brought up to date, however in the process of creating some sample code, I realised that the current release ( has a bug where the Mono.Messaging.RabbitMQ dll is not correctly resolved from the GAC meaning that anyone wanting to use the messaging libraries will need to add the mono libraries to their MONO_PATH environement variable e.g. MONO_PATH=/usr/lib/mono/2.0. This is fixed in trunk though.

Tuesday, 26 May 2009

RabbitMQ client version 1.5.3, licensing and Message Enumerators

Been busy the last week or so on the System.Messaging/AMQP integration on Mono, I updated the RabbitMQ client library to version 1.5.3, only to have them release a new version of the library (1.5.5) literally the day after. Mirco Bauer, who handles the packaging for Debian, ran into a bit of a problem with the way we included the RabbitMQ library. Unfortunately the AMQP spec files are not considered Free under the terms of the DFSG, which is not much of a problem as we do not use them during the build. However, the .cs files that are generated from the specs contained comments that were extracted verbatim from said specs, which make the .cs files non-free too. Anyway, to cut a long story short, I've patched the RabbitMQ code generator and pushed the patch back upstream so that we can generate the .cs files without comments and I'm in the process of fixing the generated files in Mono's trunk and 2.4 branch.

As far as actual new functionality goes, I've updated the MessageEnumerator support, so that MoveNext(TimeSpan timeout) and RemoveCurrent(TimeSpan timeout) are both supported. I've also added calls for all of the other methods through to Mono.Messaging provider layer, unfortunately the way transactions work in AMQP make it impossible use the transactional methods of MessageEnumerator (personally I blame the System.Messaging API design, but that's a rant for a different blog post). If you need transactions, then you stick to the methods in MessageQueue, which are supported.

P.S. Hello Monologue, thanks to Miguel for kindly adding me to the group of Mono bloggers.

Wednesday, 20 May 2009

Back to reality

I've been home from my round the world backpacking for a couple of weeks now and just getting back into the Mono/AMQP integration stuff. I've committed my first patch in nearly 4 months, which adds support for initialising the Messaging Provider dynamically. E.g for the current RabbitMQ implementation you need to set an environment variable.
export MONO_MESSAGING_PROVIDER="Mono.Messaging.RabbitMQ.RabbitMQMessagingProvider,Mono.Messaging.RabbitMQ"
Now to update the RabbitMQ libraries.

P.S. I'm looking for a job in London at the moment, if anyone is on the lookout for a Software Engineer/Solution Architect with 9 years of Java/C#/C++ you can contact me at "mikeb01 (at) gmail (dot) com"

Saturday, 31 January 2009

My development work on System.Messaging is going to go on hold for around 3 months, as I am about to head off back-packing around South-east Asia. I will pick it back up again when I get back to the UK.

There hasn't much progress over the last couple of weeks. I burned a fair bit of time upgrading to 1.5 of the RabbitMQ.Client dll only to find a bug (which was reported and recently fixed) in their library. There is still quite a few things to work on, currently on my list are:

- Upgrade RabbitMQ.Client library to 1.5.1.
- Finish MessageEnumerators.
- Figure out how to map System.Messaging security to AMQP's model.
- Sort out configuration support environment variables and System.Configuration.
- Performance Testing.

Saturday, 3 January 2009

Async APIs for Mono's System.Messaging

I have just added support for the asynchronous parts of the System.Messaging API for Mono, i.e. BeginPeek(), BeginReceive(), EndPeek(), EndReceive() and the associated events. There is a follow up patch waiting for review the ensures that exceptions are properly propagated back to the caller when EndPeek() or EndReceive() is called.

I have made support for these methods generic, i.e. it does not rely on the RabbitMQ implementation, thereby reducing the amount of work required to integrate another messaging implemenation. Just extend MessageQueueBase from the Mono.Messaging namespace.