New .NET/C# client library for RabbitMQ

By: on January 30, 2008

We’ve just finished and released our .NET/C# client library for AMQP. We developed it on Mono, and made sure it ran on the Microsoft .NET stacks as well – versions 1.1 and 2.0. There’s also a WCF binding, for exposing WCF-based services over AMQP. (The WCF binding only compiles and runs on the Microsoft CLR implementations, until Mono’s Olive WCF implementation matures a little, anyway.)

One interesting thing about the library is its support for more than just one protocol variant: it speaks AMQP 0-8 as standardised, AMQP 0-8 as extended by QPid, and AMQP 0-9 as standardised (sans the bits of the spec marked “work in progress”, ie. the Message class). You can switch protocol variants at runtime, and there’s a common interface that abstracts away from the incompatibilities in the protocol variants. We’ve run the library against RabbitMQ (of course), as well as QPid-java and OpenAMQ 1.2c4.

The library is documented in a PDF user guide, which actually contains quite a bit of useful general AMQP information and guidelines, and could form the core of a language-neutral RabbitMQ manual. The detailed API guide is also available – you can download the code, the binaries, and all the different reformattings of the documentation on the interim page for the .NET/C# client library.

Our RabbitMQ website is starting to look a bit messy, so we’re working on a revised layout that should be a bit tidier; then, the .NET stuff will be presented alongside all the other client libraries and bindings we have available, rather than being presented as a separate-looking piece.



  1. Tom says:

    Are you are planning any PHP libraries?

    I have not heard of a PHP API to AMQP yet, and I think it would be interesting. I’ve looked at making bindings between a C library to PHP, but many of the C libraries do tricky things behind the scenes, like create and manage threads. That doesn’t play well, when the library is linked into PHP, and then the whole thing is loaded into Apache.

  2. tonyg says:

    We’ve no plans right now to develop an AMQP PHP client. One thing that might be of interest is connecting to RabbitMQ using our experimental STOMP adapter plugin, with the PHP STOMP client (which I haven’t tried, but which looks pretty good). If this interests you, please get in touch!

  3. Tom says:

    Where could I get the Stomp adapter?

  4. tonyg says:

    Hi Tom – I’ve just made it available. Please see this post for a quick summary of compiling and running the extension. If you use mercurial, you can get a checkout of the code with “hg clone“.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>