easternbloc / node-stomp-client

A STOMP client for Node.js
Other
93 stars 47 forks source link

Heart-beat not utilized. Made my own for now. #37

Open ahudak opened 9 years ago

ahudak commented 9 years ago

I forked the repo here to implement a crude TCP heartbeat when connecting to an ActiveMQ server. I do not like the overall implementation/use case so I am not making a pull request, but if you would like to see it in action, checkout my fork.

var Stomp = require('stomp-client'); client = new Stomp('localhost', 61613, '', '', '1.1', undefined, undefined, '1000,1000'); // One second heartbeats.

https://github.com/ahudak/node-stomp-client.git

I found the activemq connection state in my app much easier to manage with this change now that the error handler gets called in a timely manner.