Camel: the MSMQ ride
Camel: the MSMQ ride
A couple of days ago I decided to contribute to the Camel project, see my previous post. In particular, I thought that writing a Camel component could have been a nice starting point.
I decided to write a component that allows sending messages through the Microsoft Message Queuing system and after a couple of days spent playing with Camel and the Java Native Interface I completed a first release of this component.
It’s pretty basic but it has already enough functionalities for sending/receiving messages with different quality of services, routing messages based on XPath expressions, etc. I didn’t implement yet any transactional support or supporting the request-reply message exchange pattern.
For developing this component I had to call the MSMQ APIs from Java. Instead of fighting with the JNI idiosyncrasies I decided to use this open source tool, SWIG. It’s very powerful and it allowed me to easily wrap the MSMQ C apis with proper Java classes.
This component will be part of the IONA’s Fuse Mediation Router product based on Apache Camel.
My experience in writing a Camel component has been nice, the APIs are quite simple and the learning curve is not too steep, I spent most part of the development time in learning SWIG and finding the bet way for integrating Java with MSMQ.
What’s next ? I’m thinking to implement other components, any ideas ? Maybe a component for sending/receiving messages to an Erlang process, another transport component for WMQ. More in the coming posts.
My Blog
Wednesday, April 2, 2008