log request before calculating the number
This commit is contained in:
parent
4078b3244d
commit
636c23b868
@ -11,10 +11,11 @@ amqp.connect('amqp://localhost', function(err, conn) {
|
||||
console.log(' [x] Awaiting RPC requests');
|
||||
ch.consume(q, function reply(msg) {
|
||||
var n = parseInt(msg.content.toString());
|
||||
var r = fibonacci(n);
|
||||
|
||||
console.log(" [.] fib(%d)", n);
|
||||
|
||||
var r = fibonacci(n);
|
||||
|
||||
ch.sendToQueue(msg.properties.replyTo,
|
||||
new Buffer(r.toString()),
|
||||
{correlationId: msg.properties.correlationId});
|
||||
|
Loading…
Reference in New Issue
Block a user