[rabbitmq-discuss] RabbitMQ C library + Perl

David Wragg david at rabbitmq.com
Tue Jan 18 16:57:19 GMT 2011


Hi Bill,

Bill Moseley <moseley at hank.org> writes:
> We have C and C++ code that needs to talk to RabbitMQ.  I have a few
> questions about the C library.
>
> I hope I have not missed something obvious, but Is there documentation for
> librabbitmq, the C library found at http://hg.rabbitmq.com/rabbitmq-c/
> ?

No, there's no formal documentation for it yet.  Though if you are
familiar with the AMQP 0.8/0.9.1 spec, or one of our client libraries
for another language, the API of librabbitmq should be largely
self-explanatory.  And there is sample code in the "examples" and
"tools" directories.

> I've also been using the Net::RabbitMQ Perl module for some tests.  It's
> lacking a number of features available with RabbitMQ (which Emile has helped
> resolve). But, I'm a little unclear about the Perl module.  It seems to
> included some version of the librabbitmq code -- for example amqp_api.c has
> some similarities with librabbitmq:
>
> http://hg.rabbitmq.com/rabbitmq-c/file/68f0c4b68086/librabbitmq/amqp_api.c#l122
> http://cpansearch.perl.org/src/JESUS/Net-RabbitMQ-0.1.8/amqp_api.c
>
> Does the Perl module embed the needed librabbitmq code because the library's
> API changes over time and would thus break?  I would think a more typical
> approach would be for the Perl module to just link to librabbitmq so that
> the Perl module and the library can be managed separately.

Well, you'll have to ask to author of the Perl module for an official
answer.  But I would guess that it's due to the fact that we have not
done formal versioned releases of rabbitmq-c yet.

> So, my question (besides about documentation) is if I needed to update the
> Perl module for my use (to expose more features of RabbitMQ) would it be
> better to remove the embedded library code and instead try and link to
> librabbitmq installed separately?
>
> My Perl XS and C skills are pretty rusty, so I suspect I'll need some
> additional help.  If anyone is interested in helping with this please let me
> know.

My Perl XS knowledge has rusted away completely, I'm afraid.  Assuming
that the embedded source code is just an old copy of librabbitmq, I
expect that removing it will work, as long as the module build process
can find the librabbitmq headers and library.  But the only way to be
sure is to give it a go.  If you run into problems on the librabbitmq
side, I may be able to help.

David

-- 
David Wragg
Staff Engineer, RabbitMQ
SpringSource, a division of VMware


More information about the rabbitmq-discuss mailing list