Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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