8000 log request before calculating the number · syk-coder/rabbitmq-tutorials@636c23b · GitHub
[go: up one dir, main page]

Skip to content

Commit 636c23b

Browse files
committed
log request before calculating the number
1 parent 4078b32 commit 636c23b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript-nodejs/src/rpc_server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ amqp.connect('amqp://localhost', function(err, conn) {
1111
console.log(' [x] Awaiting RPC requests');
1212
ch.consume(q, function reply(msg) {
1313
var n = parseInt(msg.content.toString());
14-
var r = fibonacci(n);
1514

1615
console.log(" [.] fib(%d)", n);
1716

17+
var r = fibonacci(n);
18+
1819
ch.sendToQueue(msg.properties.replyTo,
1920
new Buffer(r.toString()),
2021
{correlationId: msg.properties.correlationId});

0 commit comments

Comments
 (0)
0