Created
June 11, 2014 21:48
-
-
Save tedkulp/e3bebcd7c4c8e7c02a0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ = require('lodash') | |
rpc = require('amqp-rpc').factory | |
url: "amqp://admin:changeme@192.168.100.10:5672" | |
exchange: "rpc_exchange" | |
rpc.on 'echo.*', (params, cb, callInfo) -> | |
if params.message | |
reply = { | |
echo: true | |
message: params.message | |
} | |
_.delay -> | |
cb(reply) | |
, 10000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment