nats-io / nats-architecture-and-design

Architecture and Design Docs
Apache License 2.0
170 stars 20 forks source link

Add (force) reconnect method #259

Open Jarema opened 4 months ago

Jarema commented 4 months ago

Overview

Client should have a way that allows users to force reconnection process. This can be useful for refreshing auth or rebalancing clients.

When triggered, client will drop connection to the current server and perform standard reconnection process. That means that all subscriptions and consumers should be resubscribed and their work resumed after successful reconnect where all reconnect options are respected.

For most clients, that means having a reconnect method on the Client/Connection handle.

Connection spec has bee updated in #258

Clients and Tools

Other Tasks

Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.

pkgonan commented 1 month ago

Hi, Team!

This is min.k from Hyperconnect (Paid customer).

Please also add nats.swift to the target libraries that add this feature.

pkgonan commented 1 month ago

And please add nats.ws!

Jarema commented 1 month ago

Nats.ws is covered here by the Javascript client. All js clients share the API codebase @pkgonan