Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/octu0/nats-wsmsg
nats.io based websocket message queue server
https://github.com/octu0/nats-wsmsg
go golang message-queue nats nats-messaging natsio pubsub queue websocket
Last synced: about 2 months ago
JSON representation
nats.io based websocket message queue server
- Host: GitHub
- URL: https://github.com/octu0/nats-wsmsg
- Owner: octu0
- License: apache-2.0
- Created: 2018-12-15T22:29:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-19T00:09:06.000Z (about 1 year ago)
- Last Synced: 2024-06-19T10:13:55.891Z (6 months ago)
- Topics: go, golang, message-queue, nats, nats-messaging, natsio, pubsub, queue, websocket
- Language: Go
- Homepage:
- Size: 85.9 KB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nats-wsmsg
[![MIT License](https://img.shields.io/github/license/octu0/nats-wsmsg)](https://github.com/octu0/nats-wsmsg/blob/master/LICENSE)
[![GoDoc](https://godoc.org/github.com/octu0/nats-wsmsg?status.svg)](https://godoc.org/github.com/octu0/nats-wsmsg)
[![Go Report Card](https://goreportcard.com/badge/github.com/octu0/nats-wsmsg)](https://goreportcard.com/report/github.com/octu0/nats-wsmsg)
[![Releases](https://img.shields.io/github/v/release/octu0/nats-wsmsg)](https://github.com/octu0/nats-wsmsg/releases)[nats.io](https://nats.io/) based websocket message pubsub/queue server.
nats-wsmsg embeds [nats-server](https://github.com/nats-io/nats-server) and provides high performance, message (queue) server.
## Quick Start
Download latest [release](https://github.com/octu0/nats-wsmsg/releases) version appropriate for operating architecture.
Run.```
$ ./nats-wsmsg -p 8080
```### example Pub/Sub
![output1](https://user-images.githubusercontent.com/42143893/50048366-70316a00-010d-11e9-8196-d84c00c0bc82.gif)
### example Pub/Queue
![output2](https://user-images.githubusercontent.com/42143893/50048371-8d663880-010d-11e9-833a-eeb3cbdcf294.gif)
see more [example](https://github.com/octu0/nats-wsmsg/tree/master/example).
## Build
Build requires Go version 1.17+ installed.
```
$ go version
```Run `make pkg` to Build and package for linux, darwin.
```
$ git clone https://github.com/octu0/nats-wsmsg
$ make pkg
```## Help
```
NAME:
nats-wsmsgUSAGE:
nats-wsmsg [global options] command [command options] [arguments...]VERSION:
1.4.0COMMANDS:
websocket run websocket server
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--log-dir value /path/to/log directory (default: "/tmp") [$WSMSG_LOG_DIR]
--debug, -d debug mode [$WSMSG_DEBUG]
--verbose, -V verbose. more message [$WSMSG_VERBOSE]
--help, -h show help
--version, -v print the version
```### subcommand: websocket
```
NAME:
nats-wsmsg websocket - run websocket serverUSAGE:
nats-wsmsg websocket [command options] [arguments...]OPTIONS:
-i value, --ip value server bind-ip (default: "[0.0.0.0]") [$WSMSG_BIND_IP]
-p value, --port value server bind-port (default: "8080") [$WSMSG_BIND_PORT]
--max-payload value nats msg max payload size(byte) (default: 1048576) [$WSMSG_MAX_PAYLOAD]
--http-read-timeout value http server read timeout(seconds) (default: 10)
--http-write-timeout value http server write timeout(seconds) (default: 10)
--http-idle-timeout value http server idle timeout(seconds) (default: 15)
```