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

Alvaro Videla videlalvaro at gmail.com
Sun Nov 4 18:20:34 GMT 2012


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


More information about the rabbitmq-discuss mailing list