stomp-js icon indicating copy to clipboard operation
stomp-js copied to clipboard

Does it support reconnect automatically

Open neoqing opened this issue 11 years ago • 4 comments

Hi,All: I'm using activeMQ and this client, but time to time, I found that the client lost the connection without any notification, and I checked activeMQ doc ,it does support the reconnection,http://activemq.apache.org/how-can-i-support-auto-reconnection.html, but I did not see this feature in the nodejs client? Or there is some way that I don't know, thanks in advance.

neoqing avatar Dec 09 '13 01:12 neoqing

I was running into this exact same thing with ActiveMQ...especially using SSL. I tried a few things like using timeout/keepAlive in the connection setup, but that didn't work. I did not try the failover setting the website recommends.

I just made a pull request, this has my update to emit a "disconnected" event which I can then catch in my code and then just reconnect. I am sure there is a better way, but this did get the job done for me.

dkhunt27 avatar Dec 09 '13 16:12 dkhunt27

Hi,Dan: Thank you very much, I'll try this approach and update to this thread. thanks for sharing.

Neo

On Tue, Dec 10, 2013 at 12:34 AM, Dan Hunt [email protected] wrote:

I was running into this exact same thing with ActiveMQ...especially using SSL. I tried a few things like using timeout/keepAlive in the connection setup, but that didn't work. I did not try the failover setting the website recommends.

I just made a pull request, this has my update to emit a "disconnected" event which I can then catch in my code and then just reconnect. I am sure there is a better way, but this did get the job done for me.

— Reply to this email directly or view it on GitHubhttps://github.com/benjaminws/stomp-js/issues/30#issuecomment-30147215 .

neoqing avatar Dec 10 '13 06:12 neoqing

Any idea when this pull request might get included?

victor73 avatar Dec 10 '13 19:12 victor73

Any update on this?

enVolt avatar Feb 28 '17 10:02 enVolt