nats

command module
v0.0.0-...-7e0ee8c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2016 License: MIT Imports: 7 Imported by: 0

README

nats

A command-line interface to gnatsd.

nats is a command-line utility for sending and receiving messages via i a gnatsd cluster. It is a thin wrapper around the NATS Go client.

Install

$ go get github.com/soofaloofa/nats

Usage

Publishing to a subject

$ nats pub subject
test
[#1] Published on [subject] : 'test'
sending
[#2] Published on [subject] : 'sending'
messages
[#3] Published on [subject] : 'messages'

Subscribing on a subject

$ nats sub subject
Listening on [subject]
[#1] Received on [subject]: 'test'
[#2] Received on [subject]: 'sending'
[#3] Received on [subject]: 'messages'

Configuration

Use the -s flag to publish or subscribe to a different server.

$ nats -s tls://192.168.1.45:4222 pub subject

comma separate multiple servers

$ nats -s nats://192.168.1.45:4222,nats://192.168.1.46:4222 pub subject

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL