title: authentication failure working with node-amqp library while switching to stomp-client, it works
body: <p>I am using the <a href="https://github.com/postwait/node-amqp" rel="noreferrer">node-amqp</a> library to connect to a on-line stomp service, before I was using <a href="https://github.com/easternbloc/node-stomp-client" rel="noreferrer">stomp-client</a>, it was connected very successfully, but it doesn't support auto failure detection and reconnect, so I want to switch to node-amqp for more robust support.</p>
  
  <pre><code>var amqp = require('amqp');
  var option = { 
    host: 'host'
  , port: 61618
  , login: 'my username'
  , password: 'my password'
  };
  
  var implOpts = {
        reconnect: true,
        reconnectBackoffStrategy: 'exponential',
        reconnectBackoffTime: 500
  };
  
  var connection  = amqp.createConnection(option,implOpts);
  connection.addListener('ready', function(){
      console.log('ready connection ');
  
  });
  
  connection.on('error', function (error) {
      console.log('Connection error' ,error);
  
  });
  
  connection.on('close', function () {
      console.log('Connection close ');
  
  });
  </code></pre>
  
  <p>the hostname, password, username and port are correct and working in stomp-client library example. However by working with the code above, I got a error saying <strong>connection error  { message: 'Connection ended: possibly due to an authentication failure.' }</strong>. I looked through the code, didn't find any problem about my authentication or and code.</p>
  
  <p>Here is the working code in stomp-client library.</p>
  
  <pre><code>var StompClient = require('stomp-client').StompClient;
  
  var client = new StompClient('host', 61618, 'my username', 'my password', '1.0');
  
  client.connect(function(sessionId) {
     console.log('Trying to connect the real time service...');
  
  }); 
  </code></pre>
  
  <p>could anybody tell me how to work with node-amqp to connect stomp service</p>