[rabbitmq-discuss] Reconnecting to the Web-Stomp plugin after a network disconnection.
joshua__lim
joshua__lim at hotmail.com
Thu Jul 25 19:34:11 BST 2013
Anton Sizov wrote
> Hi
> Probably you need to create new SockJS object (tcp connection) on
> disconnect. See line 16. I assume ws is TCP connection object. More info
> for SockJS you can find at https://github.com/sockjs/sockjs-client.
> Try to move lines 16-22 to Connect() function.
> Also, any debug messages on reconnect attempt are welcome.
Hi Anton, thanks. I've managed to get it worked but just one change. Line
17: "var client = Stomp.over(ws);" cannot be inside function Connect().
ps: I still have another problem - I'm not able to subscribe to 2 queues
with ack: 'client', but that's for another thread. :)
Meanwhile, I've posted the updated codes for connection retry including the
HTML. Currently, the code retries on any error. I think it's necessary to
handle connection error from errors generated from the Web STOMP plugin
differently.
listener-app.js: http://pastebin.com/jYsHyaYd
index.html: http://pastebin.com/aW0iSyjW
--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/Reconnecting-to-the-Web-Stomp-plugin-after-a-network-disconnection-tp28227p28401.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
More information about the rabbitmq-discuss
mailing list