Reader small image

You're reading from  Designing Microservices Platforms with NATS

Product typeBook
Published inNov 2021
PublisherPackt
ISBN-139781801072212
Edition1st Edition
Concepts
Right arrow
Author (1)
Chanaka Fernando
Chanaka Fernando
author image
Chanaka Fernando

Chanaka Fernando is a solution architect with 12+ years of experience in designing, implementing, and supporting enterprise-scale software solutions for customers across various industries including finance, education, healthcare, and telecommunications. He has contributed to the open source community with his work (design, implementation, and support) as the product lead of the WSO2 ESB, one of the founding members of the "Ballerina: cloud-native programming language" project, and his own work on GitHub. He has spoken at several WSO2 conferences and his articles are published on Medium, DZone, and InfoQ. Chanaka has a bachelor's degree in electronics and telecommunications engineering from the University of Moratuwa.
Read more about Chanaka Fernando

Right arrow

How does the NATS protocol work?

At the beginning of this chapter, we mentioned that NATS is designed to cater to the requirements of modern distributed systems while providing a simple interface to work with the clients. That is why the NATS protocol, which defines the interaction between the NATS server and the NATS client, has a simple set of commands that are based on plain text messages with a publish and subscribe type model. A simple TCP client such as Telnet can communicate with the NATS server using these protocol commands.

Protocol conventions

The NATS protocol uses a set of conventions to make sure that both the client and server understand the messages that are shared:

  • Control line with optional content: Every communication that happens between the client and the NATS server consists of a command message followed by optional data. Only the PUB and MSG commands carry a payload (data) with the command.
  • Field delimiters: The different parameters and options...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Designing Microservices Platforms with NATS
Published in: Nov 2021Publisher: PacktISBN-13: 9781801072212

Author (1)

author image
Chanaka Fernando

Chanaka Fernando is a solution architect with 12+ years of experience in designing, implementing, and supporting enterprise-scale software solutions for customers across various industries including finance, education, healthcare, and telecommunications. He has contributed to the open source community with his work (design, implementation, and support) as the product lead of the WSO2 ESB, one of the founding members of the "Ballerina: cloud-native programming language" project, and his own work on GitHub. He has spoken at several WSO2 conferences and his articles are published on Medium, DZone, and InfoQ. Chanaka has a bachelor's degree in electronics and telecommunications engineering from the University of Moratuwa.
Read more about Chanaka Fernando