Module: NATS::IO

Includes:
Status
Defined in:
lib/nats/io/client.rb,
lib/nats/io/errors.rb,
lib/nats/io/version.rb

Defined Under Namespace

Classes: AuthError, BadSubject, BadSubscription, ClientError, ConnectError, ConnectionDrainingError, DrainTimeoutError, Error, NoRespondersError, NoServersError, ServerError, SlowConsumer, Socket, SocketTimeoutError, StaleConnectionError, Timeout

Constant Summary collapse

Client =

Client creates a connection to the NATS Server.

::NATS::Client
MAX_RECONNECT_ATTEMPTS =
10
RECONNECT_TIME_WAIT =
2
MAX_PENDING_SIZE =

Maximum accumulated pending commands bytesize before forcing a flush.

32768
MAX_FLUSH_KICK_SIZE =

Maximum number of flush kicks that can be queued up before we block.

1024
MAX_SOCKET_READ_BYTES =

Maximum number of bytes which we will be gathering on a single read. TODO: Make dynamic?

32768
DEFAULT_PING_INTERVAL =

Ping intervals

120
DEFAULT_PING_MAX =
2
DEFAULT_CONNECT_TIMEOUT =

Default IO timeouts

2
DEFAULT_READ_WRITE_TIMEOUT =
2
DEFAULT_DRAIN_TIMEOUT =
30
DEFAULT_SUB_PENDING_MSGS_LIMIT =

Default Pending Limits

65536
DEFAULT_SUB_PENDING_BYTES_LIMIT =
65536 * 1024
VERSION =

VERSION is the version of the client announced on CONNECT to the server.

"2.2.1".freeze
LANG =

LANG is the lang runtime of the client announced on CONNECT to the server.

"#{RUBY_ENGINE}#{RUBY_VERSION}".freeze
PROTOCOL =

PROTOCOL is the supported version of the protocol in the client.

1

Constants included from Status

Status::CLOSED, Status::CONNECTED, Status::CONNECTING, Status::DISCONNECTED, Status::DRAINING_PUBS, Status::DRAINING_SUBS, Status::RECONNECTING