Project

sps-sub

0.0
No commit activity in last 3 years
No release in over 3 years
Subscribes to a SimplePubsub (SPS) broker
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Introducing the Sps-sub gem

require 'sps-sub'

sps = SPSSub.new port: 8080

def sps.onmessage(msg)
  puts "%s: %s"  % [Time.now.to_s, msg.inspect]
end

sps.subscribe topic: 'test'

output:

Connected

2015-05-16 10:49:12 +0100: "test: hello"

Resources

spssub subscribe client simplepubsub gem