Well, the MQTT explanation by TD-er is about as clear as it gets, so there isn't much that I can add there
When using Domoticz there is one big gotcha: It's not an MQTT server...
MQTT is a server oriented solution, having a central server to store & forward the messages. Most used MQTT server combined with Domoticz is Mosquitto, and the installation and configuration process is
documented in the Domoticz Wiki
Then there's the 'problem' you are trying to solve: Getting a sensor value from one ESPEasy unit to another.
TL;DR;
I'd not use MQTT to transport that from one ESP to the next ESP, that's what we have the
ESPEasy P2P protocol for.
Using MQTT for that feels like taking the Intercity train to the next street, yes it's fast, but getting to the station (read: setting stuff up) takes way longer than taking the bicycle to that next street
Next to sending out any data via P2P to another node, you can still send the same data to Domoticz (or any other controller-supported server, just not 2 MQTT servers) to be able to collect the data and make nice graphs from that.
And an ESPEasy MQTT controller expects a complete MQTT server on the other end, not a relatively simple client like the MQTT Import plugin.
For using the
MQTT Import plugin, you (also) need an MQTT server (and a working/enabled MQTT Controller on the ESPEasy side), so the plugin can subscribe to the topics available there. And, as TD-er already explained, Domoticz uses only 2 topics to handle all incoming and outgoing messages, that's why I added the filtering, mapping and JSON parsing features to that plugin.
The filtering is needed to reduce the number of messages being processed when your sensor network increases, and you don't need (most of) the data sent out via the topic. Usually it works best filtering on the Domoticz IDX value, as that's unique for each object (sensor, switch, group, etc.) in Domoticz.
The mapping is needed to transform the yes/no/ok/on/off/up/down values sent by some Zigbee and ZWave devices like (dimmer)switches into something numeric to be handled by ESPEasy.
The JSON parsing is needed to pick out the correct values from (often) semi-colon separated messages sent by Domoticz. Parsing those in ESPEasy rules would be 'challenging', to say the least
To get some good info/knowledge on MQTT in general, there is this site:
https://www.hivemq.com/mqtt/