Tuesday, January 12, 2010

Qpid Ruby Driver

We have been playing with Apache's qpid as an amqp broker and I was getting annoyed with the need to include ext/sasl to run anything that used it as a gem. They were 99% of the way there but they didn't make the gem spec correctly so that it would actually run the sasl extconf.rb file. All you need to do is add the following line to the gem specification definition. (Line 108 in qpid-0.5/ruby/Rakefile)

s.extensions << 'ext/sasl/extconf.rb'

Now you can just include "qpid" in your client code without having to get sasl on the path.

This is one of thoses cases where github would be good, I don't know the best way to push this change back to whoever manages this code. There was a github branch of this code (colinsurprenant-qpid) but it is over a year out of date and doesn't even run against the current 0-10 version of qpid. It's too bad because he had addressed the strange way the amqp protocol xml spec files were handled and stored. I may have too look at repatching in those changes and adding the protocol files to the gem.

2 comments:

gordonsim said...

Thanks for pointing that out! Your suggested change was committed to trunk as r898419.

gordonsim said...

The best way to get code changes into qpid is to attach a patch to Jira and check the 'grant to asf' box. An additional email to either users@qpid.apache.org or dev@qpid.apache.org to highlight the Jira is often useful as well.