Skip to content

Add connection options and state: no echo, inbox prefix, drain timeout, status, server info, PSR-3 logger - #87

Merged
kafkiansky merged 1 commit into
0.5.xfrom
features/connection-options
Nov 11, 2026
Merged

kafkiansky merged 1 commit into
0.5.xfrom
features/connection-options

Conversation

@kafkiansky

Copy link
Copy Markdown
Collaborator

No description provided.

…t, status, server info, PSR-3 logger

- Config: noEcho (refused by servers without proto 1), inboxPrefix used by every inbox
  (requests, pull consumers, stream get, KV watch, object store) via Client::newInbox(),
  drainTimeout bounding Client::drain() (DrainTimedOut, the connection is closed anyway);
  uri options no_echo, inbox_prefix, drain_timeout
- Client::status() returns ConnectionStatus: Disconnected, Connecting, Connected, Reconnecting, Draining
- Client::serverInfo() returns the latest INFO of the current server as Nats\ServerInfo, updated by async INFO
- Client takes a PSR-3 logger: connected, lost, reconnect attempts, reconnected, closed,
  discovered servers, lame duck mode and the errors passed to onError
- Client::drain() waits for the handlers to finish the received messages before closing
@kafkiansky kafkiansky self-assigned this Nov 11, 2026
@kafkiansky
kafkiansky merged commit c669134 into 0.5.x Nov 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant