custom_broker_nats

command
v0.0.0-...-90bf800 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 11 Imported by: 0

README

This example shows how to use custom Broker implementation based on Nats messaging server. Here Nats handles PUB/SUB stuff while presence information managed by Redis.

Nats Broker does not support any methods related to publication history – it only provides at most once PUB/SUB.

Start Nats server locally:

go get github.com/nats-io/nats-server
nats-server

Start Redis (for handling presence):

redis-server

Finally, to start example run the following command from example directory:

go run main.go

Go to http://localhost:8000. You will see simple chat app, try writing a chat message in one browser tab and you should see it appears in another tab.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package natsbroker defines custom Nats Broker for Centrifuge library.
Package natsbroker defines custom Nats Broker for Centrifuge library.

Jump to

Keyboard shortcuts

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