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