From 46b070f845a29889d9036bb316ac61b40d07148c Mon Sep 17 00:00:00 2001 From: Tomasz Pietrek Date: Wed, 3 Jan 2024 15:04:56 +0100 Subject: [PATCH 1/2] Add on-demand reconnect to Connect Spec Signed-off-by: Tomasz Pietrek --- adr/ADR-40.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/adr/ADR-40.md b/adr/ADR-40.md index 81879178..ee960a2f 100644 --- a/adr/ADR-40.md +++ b/adr/ADR-40.md @@ -92,6 +92,13 @@ By default, those URLs are used. ### Reconnection Strategies (In progress) +#### On-Demand reconnect + +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. + #### Detecting disconnection There are two methods that clients should use to detect disconnections: From 6f2ae9b187e870a04657e46a8bc539b7321e1e15 Mon Sep 17 00:00:00 2001 From: Tomasz Pietrek Date: Thu, 4 Jan 2024 07:58:01 +0100 Subject: [PATCH 2/2] Add info on how clients can expose `reconnect` Signed-off-by: Tomasz Pietrek --- adr/ADR-40.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adr/ADR-40.md b/adr/ADR-40.md index ee960a2f..6015fe9c 100644 --- a/adr/ADR-40.md +++ b/adr/ADR-40.md @@ -96,9 +96,12 @@ By default, those URLs are used. 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. + #### Detecting disconnection There are two methods that clients should use to detect disconnections: