[rabbitmq-discuss] amqp_login -> AMQP_RESPONSE_NONE (RabbitMQ C Client)

Tony Garnock-Jones tonyg at lshift.net
Wed Feb 17 07:12:08 GMT 2010

Hi Frank,

Frank Goenninger - Consequor Consulting AG wrote:
> Being new to RabbitMQ I am using the C client to write an abstraction  
> layer on top of RabbitMQ. I am trying to do an amqp_login call but  
> always get a AMQP_RESPONSE_NONE in amqp_rpc_reply.

That looks like a bug in the library to me. Looking at the code paths, I
notice two things:

 1. I'm ignoring the result of amqp_login_inner(). If there's a reason
    for that, I've forgotten it!

 2. Setting aside (1), if the code proceeds to the call to
    amqp_simple_rpc() in amqp_login(), there seems not to be a path
    that can avoid setting reply_type to some non-zero value, which
    makes your AMQP_RESPONSE_NONE result unusual to say the least.

> Is this normal, i.e. this is NOT an error? Do I get a server error if  
> the login fails or do I get this AMQP_RESPONSE_NONE if the login fails?

You ought to get some non-zero reply_type that is not
library. Unfortunately, during the login procedure, the server is not
allowed to tell you the cause of the problem if it decides it is going
to hang up on you: it will simply drop the connection. So check the
server's error logs to get a clue as to what is going wrong.

Can you post the code you're using for connecting to and logging in to
the broker? It would help in figuring out how you can possibly be seeing


More information about the rabbitmq-discuss mailing list