[rabbitmq-discuss] Searching for a client library/example: Problems getting a reliable connection in Python and Erlang

Jerry Kuch jerryk at rbcon.com
Sun Nov 4 18:24:38 GMT 2012


Also, further to what Alvaro said:  The Erlang client is quite reliable
and, indeed, is used by us internally for a range of things.  Its main
downside is that the documentation can be a bit sparse, especially if
you're new to Erlang, and it has had some API changes over the years that
have rendered some of what you might read about it on the internet out of
date (again, in ways that are probably harder to sort out if you're new to
the whole mess)...

+1 to Alvaro's request for some more specifics on what you're up to helping
us provide guidance... :-)

Best regards,
Jerry

On Sun, Nov 4, 2012 at 10:20 AM, Alvaro Videla <videlalvaro at gmail.com>wrote:

> Would you mind sharing some code? Is hard for us to help you without code.
>
> Regards,
>
> Alvaro
>
> Sent from my iPhone
>
> On Nov 4, 2012, at 7:06 PM, Daniel Neugebauer <
> mailinglists at energiequant.de> wrote:
>
> > Hi!
> >
> > I wanted to use RabbitMQ for simple log collection but for some reason I
> > can't find any useful AMQP client library (and what good is a server
> > without a working client?). I'd like to implement in either Python or
> > Erlang but I'm unable to get a reliable connection - either connection
> > setup fails, strange error messages appear after a short uptime or the
> > client just cannot handle connection loss.
> >
> > What I've written so far is a simple Python script that takes lines from
> > stdin, builds a dictionary from it and tries to send it via amqplib,
> > Pika or Kombu (which seems to decide on using amqplib internally). It's
> > nothing special, I already have a serialized string, that's all I need
> > to send.
> >
> > However, Pika or amqplib (it's been a while since I tried them, so I
> > don't remember which one it was) appeared to have some buffer issue -
> > although the connection (to localhost) was still alive, I would get
> > error messages about messages queueing up in the client after a few
> > minutes. The other library would loose connection a few seconds after
> > connecting but doesn't notice. Kombu terminates when the connection to
> > RabbitMQ is lost, although I would expect Kombu to retry since I set
> > retry = True when calling publish on the Producer object. I'm already
> > running a reconnect in a loop with a try/except inside but my script
> > just terminates. Strange...
> >
> > I also tried to use amqp_client in Erlang but failed to get any
> > connection (I always get unknown_host unless I enter nothing as host
> > name). I should add that I only read into Erlang theoretically so far
> > and didn't get to write much but example programs yet, so it's likely I
> > do something wrong here (yes, I already tried both binary lists and
> > regular lists, no difference; I even tried supplying IP addresses in
> > various forms - without success). Documentation is scarce and what I
> > found suggests that I'm doing nothing wrong. I would prefer staying with
> > Python for this implementatin anyway, just thought the client that comes
> > with RabbitMQ should be able to work fine - unfortunately I seem to be
> > wrong here. :(
> >
> > My question is: Does anyone have a complete working example of a
> > *reliable* client in Python (or Erlang)? Maybe I'm too stupid to read
> > the (very brief?) documentation correctly or the libraries I tried so
> > far are just too buggy... What I started with was an example from
> > "RabbitMQ in Action" but even that didn't work as expected.
> >
> > If it wasn't for getting logs piped in on the console I would try Java
> > clients instead as I expect them to be more mature - to me, the Python
> > libraries appear to be a bit messy, pardon my (maybe wrong) impression
> > but I'm starting to get very frustrated with this: I've never had more
> > problems to just get a simple plain string handed over to some other
> > system. All in all I've spent too many hours in trying to get anything
> > working and nothing has worked so far.
> >
> > Thanks,
> > Daniel
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121104/7befbf1a/attachment.htm>


More information about the rabbitmq-discuss mailing list