Module: NATS::Status

Included in:
Client, IO
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/client.rb

Overview

Status represents the different states from a NATS connection. A client starts from the DISCONNECTED state to CONNECTING during the initial connect, then CONNECTED. If the connection is reset then it goes from DISCONNECTED to RECONNECTING until it is back to the CONNECTED state. In case the client gives up reconnecting or the connection is manually closed then it will reach the CLOSED connection state after which it will not reconnect again.

Constant Summary collapse

DISCONNECTED =

When the client is not actively connected.

0
CONNECTED =

When the client is connected.

1
CLOSED =

When the client will no longer attempt to connect to a NATS Server.

2
RECONNECTING =

When the client has disconnected and is attempting to reconnect.

3
CONNECTING =

When the client is attempting to connect to a NATS Server for the first time.

4
DRAINING_SUBS =

When the client is draining a connection before closing.

5
DRAINING_PUBS =
6