i have to create a virtual topology with miniedit that has to talk using the mqtt sub/pub system.

i'm working on virtualbox (mininet-wifi) i have installed mosquitto & the clients... using the terminals i have no problem with:

mosquitto_sub -t test

mosquitto_pub -t test -m hello!

but when i emulate the topology on Miniedit with (controller,switch and two hosts), the hosts cannot talk using mosquitto, i think that there is no broker that can handle the communications in the virtual topology, any suggestions?

I tried to connect also to a remote server, using cloudmqtt but i only got failed connection

i expect that using

xterm h1 h2

on the Comand Line Interface of miniedit, i would be capable of make the two hosts talks beetween them using mosquitto_sub/pub system, because also in the xterm of the host, if i type

service mosquitto status

i obtain that

mosquitto is active

UPDATE solved. i just have to run another host in which i type "mosquitto" and the others hosts would just reach it using "mosquitto_sub/pub - h for example

1 Answers

hardillb On

2 brokers (1 on each hosts) won't automatically discover each other when the "link" comes up.

You will have to either manually configure the a bridge between the 2 brokers if you want messages to be shared.

Or pick one and have the clients explicitly connect to that one broker. e.g. the -h option for the mosquitto_pub or mosquitto_sub commands.