2
votes

I am trying to use MQTT Lens plugin as a client to a container running RabbitMQ on a virtual machine. To start the container on the virtual machine i run this command:

docker container run -d --hostname my-rabbit -p 8080:15672 -p 5671:5671 -p 5672:5672 -p 1883:1883 --name rabbitedgex rabbitmq:3

Then in my host machine, a configure a queue through the plugin administrator by going to the browser and typing:

10.0.2.6:8080

Finally, I used the MQTT Lens to try to send messages to the configure queue but it does not connect to the container.

To configure it I used this direction:

tcp://10.0.2.6:1883

10.0.2.6 is the private address of the virtual machine where the container is running and 1883 is the usual port it uses to listen to clients and which I expose in the configuration of the container. Does any know which is the problem I am having, the why lens is not able to connect to the broker?

Thanks in advance.

1
Did you tried port 5672 - tcp://10.0.2.6:5672?m1ch4ls
Yes, i tried that port and i did not work, i accept any other suggestionJBeloqui
This is what a i get when i ran the docker container ls command: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f6c0b7b8c68e rabbitmq:3 "docker-entrypoint..." 3 days ago Up 3 days 0.0.0.0:1883->1883/tcp, 4369/tcp, 0.0.0.0:5671-5672->5671-5672/tcp, 25672/tcp, 0.0.0.0:8080->15672/tcp rabbitedgexJBeloqui

1 Answers

0
votes

I assume you already enabled the 'rabbitmq_mqtt' plugin in the RAbbitMQ. In addition to that, you have to configure the default username and password of MQTT in the RabbitMQ.

rabbitmq.conf

mqtt.default_user= username
mqtt.default_pass= password
mqtt.allow_anonymous= false
mqtt.exchange= exchange_name
mqtt.vhost= /