Since the MQTT protocol flows over TCP the difference between the three QoS levels is quite subtle. In normal conditions TCP will ensure delivery and prevent duplicates.
I intend to use MQTT to send real-time data to mobile devices, but I don’t need reliable delivery. Keeping battery consumption as low as possible is really important, so it would be great to avoid sending unnecessary messages (TCP’s acknowledgements).
Would it be possible to implement MQTT over UDP, or other unreliable transport layer protocol? Is there any existing library doing this?
MQTT-S can run over UDP, but there aren’t any publicly available libraries for it yet. Are you sure the battery usage is that much of a problem? There is a run down of some experiments done on MQTT power usage on Android at http://stephendnicholas.com/archives/219
I think that MQTT itself really makes use of the TCP delivery and ordering guarantees. I believe it would be very difficult to guarantee it working over UDP.