You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was use stompit module for connect activeMQ in node js.
My problem : Unable to identify whether broker is connected or not in stompit.ConnectFailover
Here is my code:
var stompit = require('stompit')
var connectionManager = new stompit.ConnectFailover();
connectionManager.addServer({
'host': 'localhost',
'port': 61623,
'connectHeaders':{
...
}
});
var channel = new stompit.Channel(connectionManager);
var subscribeHeaders = {
'destination': '/queue/test',
'ack': 'client'
};
channel.subscribe(subscribeHeaders, function(error, message){
if (error) {
console.log(error);
return;
}
});
//send . But not throw error , even broker is not started
//always trying to reconnect
sendDlQ(subscribeHeaders, 'Hello');
function sendDlQ(header, body){
channel.send(header, body);
}
Whenever call send method , always success. Even broker is not started.
Is there any possible to identify activeMQ broker is connected or not before send ?
The text was updated successfully, but these errors were encountered:
SivaPsr
changed the title
How to check socket connection is available or not in nodejs stompit
How to check socket connection is available or not in nodejs
Jun 7, 2018
Hi @gdaws @scop
I was use stompit module for connect activeMQ in node js.
My problem : Unable to identify whether broker is connected or not in stompit.ConnectFailover
Here is my code:
Whenever call send method , always success. Even broker is not started.
Is there any possible to identify activeMQ broker is connected or not before send ?
The text was updated successfully, but these errors were encountered: