pubsub

Vardius - pubsub

Build Status Go Report Card codecov license

pubsub - gRPC message-oriented middleware on top of message-bus, event ingestion and delivery system.

Table of Contents - [About](#about) - [How to use](#how-to-use) - [Docker](#docker) - [How to use this image](#how-to-use-this-image) - [Environment Variables](#environment-variables) - [Makefile](#makefile) - [Client](https://github.com/vardius/pubsub/tree/master/proto#client) - [Use in your Go project](https://github.com/vardius/pubsub/tree/master/proto#use-in-your-go-project) - [Publish](https://github.com/vardius/pubsub/tree/master/proto#publish) - [Subscribe](https://github.com/vardius/pubsub/tree/master/proto#subscribe) - [Protocol Buffers](https://github.com/vardius/pubsub/tree/master/proto#protocol-buffers) - [Generating client and server code](https://github.com/vardius/pubsub/tree/master/proto#generating-client-and-server-code)

ABOUT

Contributors:

Want to contribute ? Feel free to send pull requests!

Have problems, bugs, feature ideas? We are using the github issue tracker to manage them.

HOW TO USE

Docker

How to use this image

Starting a pubsub instance:

docker run --name my-pubsub -e QUEUE_BUFFER_SIZE=100 -d vardius/pubsub:tag

Environment Variables

HOST (string)

This is optional variable, sets gRPC server host value. Default 0.0.0.0

PORT (int)

This is optional variable, sets gRPC server port value. Default 9090

QUEUE_BUFFER_SIZE (int)

This is optional variable, sets buffered channel length per subscriber. Default 0, which evaluates to runtime.NumCPU().

KEEPALIVE_MIN_TIME (nanoseconds)

This is optional variable, if a client pings more than once every 5 minutes (default), terminate the connection.

KEEPALIVE_TIME (nanoseconds)

This is optional variable, ping the client if it is idle for 2 hours (default) to ensure the connection is still active.

KEEPALIVE_TIMEOUT (nanoseconds)

This is optional variable, wait 20 second (default) for the ping ack before assuming the connection is dead.

LOG_VERBOSE_LEVEL (int)

This is optional variable, Verbose level. -1 = Disabled, 0 = Critical, 1 = Error, 2 = Warning, 3 = Info, 4 = Debug. Default 3 (Info).

Makefile

➜  pubsub git:(master) make help
version                        Show version
docker-build                   Build given container. Example: `make docker-build`
docker-run                     Run container on given port. Example: `make docker-run PORT=9090`
docker-stop                    Stop docker container. Example: `make docker-stop`
docker-rm                      Stop and then remove docker container. Example: `make docker-rm`
docker-publish                 Docker publish. Example: `make docker-publish REGISTRY=https://your-registry.com`
docker-tag                     Tag current container. Example: `make docker-tag REGISTRY=https://your-registry.com`
docker-release                 Docker release - build, tag and push the container. Example: `make docker-release REGISTRY=https://your-registry.com`

Client

See proto package for details.