Hi I am trying to connect to a TIBCO queue. I am using the below code as suggested by the documentation. But i am getting a error as shown below.Please let me know what is the problem with my code.
error: Error: write ECONNRESET
at exports._errnoException (util.js:837:11)
at Socket._writeGeneric (net.js:675:26)
at Socket._write (net.js:694:8)
at doWrite (_stream_writable.js:292:12)
at clearBuffer (_stream_writable.js:396:7)
at onwrite (_stream_writable.js:331:7)
at WritableState.onwrite (_stream_writable.js:89:5)
at Socket._writeGeneric (net.js:684:5)
at Socket. (net.js:630:12)
at Socket.g (events.js:260:16)error name: Error
{ [Error: write ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'w
rite' }
The code as below :
var stomp = require('stomp');
var stomp_args = {
port: 7222,
host:'localhost',
debug: true,
login: '',
passcode: '',
};
var client = new stomp.Stomp(stomp_args);
client.connect();
client.on('connected', function () {
num = num || 1000;
for (var i = 0; i < num; i++) {
client.send({
'destination': '/queue/testqueue',
'body': 'Testing\n\ntesting1\n\ntesting2 ' + i,
'persistent': 'true'
}, receipt);
//sleep(250);
}
console.log('Produced ' + num + ' messages');
client.disconnect();
});
client.on('receipt', function (receipt) {
console.log("RECEIPT: " + receipt);
});
client.on('error', function (error_frame) {
console.log(error_frame);
client.disconnect();
});
Hi I am trying to connect to a TIBCO queue. I am using the below code as suggested by the documentation. But i am getting a error as shown below.Please let me know what is the problem with my code.
error: Error: write ECONNRESET at exports._errnoException (util.js:837:11) at Socket._writeGeneric (net.js:675:26) at Socket._write (net.js:694:8) at doWrite (_stream_writable.js:292:12) at clearBuffer (_stream_writable.js:396:7) at onwrite (_stream_writable.js:331:7) at WritableState.onwrite (_stream_writable.js:89:5) at Socket._writeGeneric (net.js:684:5) at Socket. (net.js:630:12)
at Socket.g (events.js:260:16)error name: Error
{ [Error: write ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'w
rite' }
The code as below :
var stomp = require('stomp'); var stomp_args = { port: 7222, host:'localhost', debug: true, login: '', passcode: '', }; var client = new stomp.Stomp(stomp_args); client.connect(); client.on('connected', function () { num = num || 1000; for (var i = 0; i < num; i++) { client.send({ 'destination': '/queue/testqueue', 'body': 'Testing\n\ntesting1\n\ntesting2 ' + i, 'persistent': 'true' }, receipt); //sleep(250); } console.log('Produced ' + num + ' messages'); client.disconnect(); });