Building Distributed Systems and Microservices in Go with NATS Streaming

Introducing NATS Streaming

File store for persistent logs

Setup NATS Streaming

go get github.com/nats-io/nats-streaming-server
go get github.com/nats-io/go-nats-streaming
 nats-streaming-server
nats-streaming-server \--store file \--dir ./data \--max_msgs 0 \--max_bytes 0
--store <string>           Store type: MEMORY|FILE (default: MEMORY)
--dir <string> For FILE store type, this is the root directory
--max_msgs <int> Max number of messages per channel (0 for unlimited)
--max_bytes <size> Max messages total size per channel (0 for unlimited)
NATS Streaming Server runs using an embedded NATS Server

Building Distributed Systems with NATS Streaming

msg.Ack() // Manual ACK

Clustering NATS Streaming Server

Fault Tolerance

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store