Spring AMQP + RabbitMQ 3.3.5 ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN

后端 未结 12 2035
南笙
南笙 2020-12-01 00:43

I am getting below exception

org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED

12条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 01:19

    I made exactly what @grepit made.

    But I had to made some changes in my Java code:

    In Producer and Receiver project I altered:

    ConnectionFactory factory = new ConnectionFactory();
    factory.setHost("your-host-ip");
    factory.setUsername("username-you-created");
    factory.setPassword("username-password");
    
            
    

    Doing that, you are connecting an specific host as the user you have created. It works for me!

提交回复
热议问题