Commit ddc524b8 authored by Kamron Aroonrua's avatar Kamron Aroonrua 💬

test

parent bea270db
...@@ -33,8 +33,8 @@ RPCServer.prototype.start = function(cb) ...@@ -33,8 +33,8 @@ RPCServer.prototype.start = function(cb)
ch.sendToQueue(msg.properties.replyTo,new Buffer(JSON.stringify(resp)),{correlationId: msg.properties.correlationId,persistent: false}); ch.sendToQueue(msg.properties.replyTo,new Buffer(JSON.stringify(resp)),{correlationId: msg.properties.correlationId,persistent: false});
}); });
ch.ack(msg); //ch.ack(msg);
}, {noAck: false}); }, {noAck: true});
cb(null); cb(null);
}); });
......
...@@ -28,11 +28,13 @@ var req = { ...@@ -28,11 +28,13 @@ var req = {
var idx = 0; var idx = 0;
async.whilst( async.whilst(
function() { return idx < 10000; }, function() { return idx < 2000; },
function(callback) { function(callback) {
req.id = idx; req.id = idx;
caller.call(req,function(err,resp){ caller.call(req,function(err,resp){
//console.log(resp) if(idx%100==0){
console.log(resp)
}
idx++; idx++;
callback(null); callback(null);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment