项目作者: octu0

项目描述 :
NATS based websocket message queue server
高级语言: Go
项目地址: git://github.com/octu0/nats-wsmsg.git
创建时间: 2018-12-15T22:29:59Z
项目社区:https://github.com/octu0/nats-wsmsg

开源协议:Apache License 2.0

下载


nats-wsmsg

MIT License
GoDoc
Go Report Card
Releases

nats.io based websocket message pubsub/queue server.

nats-wsmsg embeds nats-server and provides high performance, message (queue) server.

Quick Start

Download latest release version appropriate for operating architecture.
Run.

  1. $ ./nats-wsmsg -p 8080

example Pub/Sub

output1

example Pub/Queue

output2

see more example.

Build

Build requires Go version 1.17+ installed.

  1. $ go version

Run make pkg to Build and package for linux, darwin.

  1. $ git clone https://github.com/octu0/nats-wsmsg
  2. $ make pkg

Help

  1. NAME:
  2. nats-wsmsg
  3. USAGE:
  4. nats-wsmsg [global options] command [command options] [arguments...]
  5. VERSION:
  6. 1.4.0
  7. COMMANDS:
  8. websocket run websocket server
  9. help, h Shows a list of commands or help for one command
  10. GLOBAL OPTIONS:
  11. --log-dir value /path/to/log directory (default: "/tmp") [$WSMSG_LOG_DIR]
  12. --debug, -d debug mode [$WSMSG_DEBUG]
  13. --verbose, -V verbose. more message [$WSMSG_VERBOSE]
  14. --help, -h show help
  15. --version, -v print the version

subcommand: websocket

  1. NAME:
  2. nats-wsmsg websocket - run websocket server
  3. USAGE:
  4. nats-wsmsg websocket [command options] [arguments...]
  5. OPTIONS:
  6. -i value, --ip value server bind-ip (default: "[0.0.0.0]") [$WSMSG_BIND_IP]
  7. -p value, --port value server bind-port (default: "8080") [$WSMSG_BIND_PORT]
  8. --max-payload value nats msg max payload size(byte) (default: 1048576) [$WSMSG_MAX_PAYLOAD]
  9. --http-read-timeout value http server read timeout(seconds) (default: 10)
  10. --http-write-timeout value http server write timeout(seconds) (default: 10)
  11. --http-idle-timeout value http server idle timeout(seconds) (default: 15)