Skip to content

Instantly share code, notes, and snippets.

@andypiper
Created February 17, 2014 16:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andypiper/9053817 to your computer and use it in GitHub Desktop.
Save andypiper/9053817 to your computer and use it in GitHub Desktop.
Connect to NATS in bosh-lite and display all the messages received - thanks @drnic
#!/usr/bin/env ruby
require "nats/client"
NATS.start(:uri => "nats://nats:nats@10.244.0.6:4222") do
NATS.subscribe('>') { |msg, reply, sub| puts "Msg received on [#{sub}] : '#{msg}'" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment