Nowadays, several Internet of Things (IoT) deployments use publish-subscribe paradigms to disseminate IoT data to a pool of interested consumers. At the moment, the most widespread standard for such scenarios is MQTT. We also register an increasing interest in IoT-enabled Location-Based Services, where data must be disseminated over a target area and its spatial relevance as well as the current positions of the consumers must be taken into account. Unfortunately, the MQTT protocol does not support location-awareness, hence it may result in notifying consumers that are geographically far from the data source, causing increased network overhead and poor Quality of Service (QoS). We address the issue by proposing
LA-MQTT
, an extension to standard MQTT supporting spatial-aware publish-subscribe communications on IoT scenarios.
LA-MQTT
is broker-agnostic and fully backward compatible with standard MQTT. As monitoring the position of subscribers over time may cause privacy concerns,
LA-MQTT
carefully supports location privacy preservation, for which the optimal trade-off with the QoS of the spatial notifications is addressed via a learning-based algorithm. We demonstrate the effectiveness of
LA-MQTT
by experimentally evaluating its features via large-scale hybrid simulations, including real and virtual components. Finally, we provide a Proof of Concept real implementation of a
LA-MQTT
scenario.