Commit 5534f3b3 authored by Kamron Aroonrua's avatar Kamron Aroonrua 💬

rpc persist

parent 72f1d7b1
......@@ -50,7 +50,7 @@ RPCCaller.prototype.call = function(req,cb){
self.ch.responseEmitter.once(corr, (resp)=>{
cb(null,resp);
});
self.ch.sendToQueue(self.name, new Buffer(JSON.stringify(req)), { correlationId: corr, replyTo: REPLY_QUEUE })
self.ch.sendToQueue(self.name, new Buffer(JSON.stringify(req)), { correlationId: corr, replyTo: REPLY_QUEUE,persistent: false })
});
function generateUuid() {
......
......@@ -30,7 +30,7 @@ RPCServer.prototype.start = function(cb)
var req = JSON.parse(msg.content.toString());
self.remote_function(req,function(err,resp){
ch.sendToQueue(msg.properties.replyTo,new Buffer(JSON.stringify(resp)),{correlationId: msg.properties.correlationId});
ch.sendToQueue(msg.properties.replyTo,new Buffer(JSON.stringify(resp)),{correlationId: msg.properties.correlationId,persistent: false});
});
ch.ack(msg);
......
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