[rabbitmq-discuss] RabbitMQ Erlang Client
Matthias Radestock
matthias at lshift.net
Thu Apr 23 23:00:55 BST 2009
Ryan,
Ryan Kaulakis wrote:
> 1) What is the preferred way of using the erlang client for RabbitMQ?
> I've seen examples that deal directly with the amqp_channel and
> amqp_connection modules directly (with records like
> #'queue.declare_ok'{} and such), but there also seems to be a lib_amqp
> module as well. Is one more stable that the other?
lib_amqp contains convenience wrappers for the amqp_{connection,channel}
functions. In some cases they can save quite a bit of typing for common
uses of AMQP. However, the wrappers are rather ad-hoc and do not provide
anywhere near complete coverage of the AMQP functionality. Personally I
prefer to just use the core functions. YMMV.
In theory the wrappers could insulate you somewhat from changes at the
protocol level, but because of their ad-hoc nature they are actually
more likely to change than the protocol. Also, the use of default values
in the record definitions provide some a degree of stability in the
presence of protocol changes.
> 2) What header file are all of those AMQP specific records defined
> (like #'queue.declare')? I'm guessing that they're auto-generated
> somewhere but I'd like to take a look at what is actually out there.
rabbit_framing.hrl, which is indeed auto-generated and can be found in
the server "binary" packages.
> 3) What plans are there for supporting AMQP 1-0 when the standard is
> approved?
Please ask that question again nearer the time :)
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list