Created
June 26, 2013 11:01
-
-
Save andypiper/5866586 to your computer and use it in GitHub Desktop.
Ruby script to list the topics known by an MQTT broker. These will be topics with retained messages published.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'mqtt' | |
MQTT::Client.connect('localhost',1883) do |client| | |
client.get('#') do |topic,message| | |
puts "#{topic}: #{message}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment