#!/usr/bin/env ruby $:.unshift File.dirname(__FILE__)+'/../lib' require 'mqtt' client = MQTT::Client.new('hadrian.aelius.com') client.connect do client.subscribe('livetext/#') loop do topic,message = client.get puts "#{topic}: #{message}" end end