Git Product home page Git Product logo

cnats's Introduction

cnats

NATS / NATS streaming command line utility for publishing and subscribing to messages.

Installation

Go users

go get -u github.com/anjmao/cnats

Other users

Download release binary from https://github.com/anjmao/cnat/releases and add to PATH.

Usage

Initialize cnat with configuration file which is written to HOME/.cnat/config.json

Initialize with cluser, client and url.

cnats init -cluster test-cluster -client cnat-client -url nats://localhost:4222

Initialize with default values.

cnats init

Subscribe to subjects

Subscribe to nats streaming subjects.

cnats ssub topic1 topic2

Subscribe to all known subjects. Internally sub command calls stan monitoring api to get all known subjects.

cnats ssub

Subscribe at given time.

cnats ssub topic1 -at_time="2020-08-20T11:20:22.9832464Z"

Subscribe at given sequence.

cnats ssub topic1 -at_seq=0

Subscribe to nats subjects.

cnats sub topic1 topic2

Publish to subject

Publish to nats streaming.

cnats spub topic1 '{"name": "cnat"}'

Publish to nats.

cnats pub topic1 '{"name": "cnat"}'

Release

Before running make release make sure you have these tools installed.

GO111MODULE=off go get github.com/c4milo/github-release
GO111MODULE=off go get github.com/mitchellh/gox 

cnats's People

Contributors

anjmao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.