[rabbitmq-discuss] MQTT login failed for "guest" access_refused even after mentioning loopback_users

Michael Klishin mklishin at gopivotal.com
Tue Jul 22 11:21:55 BST 2014

On 22 July 2014 at 10:52:11, Ankur5 C (ankur5.c at tcs.com) wrote:
> > Just wanted to know using Paho java client how can I connect a 
> rabbit mq mqtt broker using username and password.
> At the broker side I have to add user and password and add the user 
> from rabbitmq ctl. Then what should be done at the paho java client 
> end ?
> Please suggest with example.


You don't need to configure anything
in the Paho Java client, just provide a URI, client-id and (possibly) client WAL/persister.

This is what two MqttClient constructors do:

Also, you do not technically have to add a new user to RabbitMQ but if you connect
from remote hosts and want to use reasonable security practices, that's a good idea.

That said, in the latter case non-authenticated connections is not what you want.

Staff Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list