hapi-rabbit
hapi-rabbit copied to clipboard
Should not JSON.parse(message) actually be JSON.stringify(message)?
Nice work! But ran into an error when subscribed data is received from RabbitMQ. I got if fixed by changing JSON.parse(message) to JSON.parse(message)
hapi-rabbit/lib/index.js
sub.on('data', function (message) {
// callback(null, JSON.parse(message)); -> throw an error
callback(null, JSON.stringify(message));
});