The CONNECT message is the client version of the INFO message. Once the client has established a TCP/IP
socket connection with the NATS server, and an INFO message has been received from the server, the client
may send a CONNECT message to the NATS server to provide more information about the current connection as
well as security information.
The PUB message publishes the message payload to the given subject name, optionally supplying a reply subject.
If a reply subject is supplied, it will be delivered to eligible subscribers along with the supplied payload.
Note that the payload itself is optional.
The -ERR message is used by the server indicate a protocol, authorization, or other runtime
connection error to the client. Most of these errors result in the server closing the connection.
As soon as the server accepts a connection from the client, it will send information about itself and the
configuration and security requirements that are necessary for the client to successfully authenticate with
the server and exchange messages.