lundi 30 mars 2015

I need help to start using Rabbitmq (client)

I want start using the rabbitmq client, to receive datas from a queue. This queue is online, and I have all the informations to create a connection to it:



  • host

  • username

  • password

  • virtual host

  • port


I wrote an application in java to create a connection using the ConnectionFactory class:



import com.rabbitmq.client.ConnectionFactory;


public class Stats {


public final static String TOKEN = "1234567";
public final static String USER = "username";
public final static String HOST = "amqp.host.org";
public final static String VHOST = "topsecretdatas";
public final static int PORT = 5672;


public static void main(String[] args)
throws java.io.IOException, java.lang.InterruptedException {

ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setHost(HOST);
connectionFactory.setUsername(USER);
connectionFactory.setPassword(TOKEN);
connectionFactory.setVirtualHost(VHOST);

connectionFactory.newConnection();
}
}


But at the last line, an exception is raised (com.rabbitmq.client.AuthenticationFailureException). The message is:



  • "ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile."


So:



  1. Are there some log files on my PC? I think no..

  2. I don't know how to change the authentication mechanism. How can I resolve my problems and create my connection?


Aucun commentaire:

Enregistrer un commentaire