Yes MK,web stomp is enabled and restarted rabbitmq and examples are also working fine...but in case of examples they are using extra sockjs library...which I can't use in my nodejs app.
In stomp-node.js file of stompjs,it is not able to call the "connect" to websocket. The bold red colored event.
wrapWS = function(url) {
var WebSocketClient, connection, socket, ws;
WebSocketClient = require('websocket').client;
connection = null;
ws = {
url: url,
send: function(d) {
return connection.sendUTF(d);
},
close: function() {
return connection.close();
}
};
socket = new WebSocketClient();
socket.on('connect', function(conn) {
connection = conn;
ws.onopen();
connection.on('error', function(error) {
return typeof ws.onclose === "function" ? ws.onclose(error) : void 0;
});
connection.on('close', function() {
return typeof ws.onclose === "function" ? ws.onclose() : void 0;
});
return connection.on('message', function(message) {
var event;
if (message.type === 'utf8') {
event = {
'data': message.utf8Data
};
return ws.onmessage(event);
}
});
});
socket.connect(url);
return ws;
};