Skip to content

Instantly share code, notes, and snippets.

View stephenfuqua's full-sized avatar

Stephen Fuqua stephenfuqua

View GitHub Profile
@kmpm
kmpm / amqprpc.js
Created May 17, 2012 18:45
RPC over RabbitMQ/AMQP
var amqp = require('amqp')
, crypto = require('crypto')
var TIMEOUT=2000; //time to wait for response in ms
var CONTENT_TYPE='application/json';
var CONTENT_ENCODING='utf-8';
exports = module.exports = AmqpRpc;
function AmqpRpc(connection){