MQTT Raspberry Pi
The broker is primarily responsible for receiving all messages, filtering the messages, decide who is interested in it and then publishing the message to all subscribed clients.
Installing Mosquitto Broker on Raspbian OS
https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/
Test MQTT Broker Installation
https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/
Another site
https://appcodelabs.com/introduction-to-iot-build-an-mqtt-server-using-raspberry-pi