MQTT is a machine-to-machine (M2M)/Internet of Things connectivity protocol. It was designed with extremely lightweight that support embedded and low power processing device. You may read more about it here. MQTT is broker based message queuing system. To work with Mqtt, Mqtt Message broker/server required. Mosquitto is an open source Mqtt Broker. In ubuntu mosquitto can be installed using the command
$ sudo apt-get install mosquitto
Eclipse Paho is one mqtt client work well with mosquitto. You may read more about it here.
MQTT Scala subscriber and publisher code based on eclipse paho library 0.4.0 is available in