[rabbitmq-discuss] Erlang Client Example Code

Glenn Rempe glenn at rempe.us
Fri Feb 26 05:53:06 GMT 2010

Thanks Ben.  I've made your suggested changes, and I've sent Dane a
pull request.

You can take a look here.


It might be nice to figure out a way to pull these examples into the
Erlang client codebase so others can see it without hunting.

I'm struggling a bit with how I can best make use of the direct client
since it seems that it can only run on the same node as the RabbitMQ
server process (and not across nodes).  If I am mistaken please feel
free to correct me. :-)  I'll put together a new thread for that
question though when I dig a little more.



On Thu, Feb 25, 2010 at 3:37 PM, Ben Hood <0x6e6562 at gmail.com> wrote:
> Dane, Glenn,
> On Fri, Feb 26, 2010 at 5:50 AM, Dane Jensen <dane.jensen at gmail.com> wrote:
>> On Wed, Feb 24, 2010 at 9:26 PM, Glenn Rempe <glenn at rempe.us> wrote:
>>> As I am busy learning the ins and outs of Erlang I wanted to make
>>> direct connections between an Erlang Yaws Websockets program I am
>>> developing and RabbitMQ.
>>> As part of my (steep!) learning process I updated the
>>> rabbitmq-erlang-code-examples project done by 'careo' on GitHub to
>>> compile and work against the latest RabbitMQ and RabbitMQ Erlang
>>> Client code. The examples now also include use of the 'direct client'
>>> (which was really only a one line change).
>> Excellent! Thank you for doing that. I've merged your fork in.
> I have a cursory glance at the examples and I'm suggesting some minor
> improvements:
> - Tickets, Realms and the access.request command are no longer in the
> AMQP spec and hence are treated as NOOPs in Rabbit - you can safely
> remove these;
> - The codegen module creates sensible defaults for the command
> records, so unless you need to override an attribute, you can make
> your record definitions more concise;
> - You can use amqp_connection:close/1 which is terser than
> amqp_connection:close/3;
> Ben

More information about the rabbitmq-discuss mailing list