Reconnect subscription
See original GitHub issueWhen I turn the nats-streaming server on and off, the node-nats-streaming client reconnects. However, the subscription does not continue sending message
events. Neither does it send an error
event or any other events as far as I can see.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
reconnect-business-pre-subscription-form.pdf - USDA
ReConnect Program Broadband Pre-subscription Form for Other Businesses 1. ReConnect Program: Pre-subscription Form for Other Businesses.
Read more >Subscriptions - Apollo GraphQL Docs
Unlike queries, subscriptions are long-lasting operations that can change their result over time. They can maintain an active connection to your GraphQL server ......
Read more >bug: Subscriptions are not re-registered on socket reconnect ...
When the socket connect is lost to the tRPC server and then reconnect subscriptions requests are not automatically sent out again.
Read more >How to detect disconnect and reconnect for subscription ...
I finally found the solution. It turns out that you can declare a SubscriptionClient first and then insert this into WebSocketLink , rather...
Read more >Reconnect to your Subscription - Simply Piano 101
Reconnect to your Subscription · For Apple purchases: Make sure your device is logged onto the same Apple ID that purchased the subscription....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @aricart, as I understand to make
node-nats-streaming
to constantly try to reconnect I need to specifymaxAttempts=-1
,waitOnFirstConnect=true
- with other options as defaults it tries to reconnect about 7-8 times and I receiveconnection_lost
event. Looking at the stan.js code, the line which is preventing the nats-streaming to keep reconnecting is: https://github.com/nats-io/stan.js/blob/master/lib/stan.js#L357If I set
stanMaxPingOut
to let’s say999
it will keep reconnecting until maxpingout reaches 999. Is it correct behaviour and I’m missing something?Thanks
[EDIT] NATS Streaming version: 0.2.6
Also once the NATS streaming reconnects then I receive
connection_lost
event with a message:client has been replaced or is no longer registered
, I will add that I’m not providing any existing NATS client to the connect method of nats streaming.Great - I am going to close this issue if you find something else please reopen.