NATS is a Cloud Native messaging system designed to be lightweight and high-performance.
In this scenario, you'll learn how to start a NATS server and use it as a SUB/PUB message broker. The aim is to allow Microservices to communicate via NATS.
In this scenario we learned how to start the NATS Server, connect a client and use the protocol to SUB/PUB messages.
In future scenarios, we'll explore how to connect clients and use NATS Server within a Microservices architecture.
Visit http://nats.io/download/nats-io/gnatsd/ to download the NATS Server.
Launch NATS server
NATS Server is written in Go and available across multiple platforms. The server uses a text based protocol making it accessible to clients created in different languages.
The first step to launching NATS is to download the pre-built binary from Github.
The command below will download and unzip the binary onto the first host.
curl -OL https://github.com/nats-io/gnatsd/releases/download/v0.9.6/gnatsd-v0.9.6-linux-amd64.zip && unzip gnatsd-v0.9.6-linux-amd64.zip