mxriverlynn / rabbus

A micro-service bus with built-in messaging patterns, for NodeJS and RabbitMQ
116 stars 26 forks source link

Passed the `response` on `reply` event. #3

Closed rtorino closed 9 years ago

rtorino commented 9 years ago

How about passing the response object on reply event in the responder? We have a use case where we have a logger-service that logs every responder response. It would be easier if we could just listen for reply event on every responder instance and grab the response data that it passed and send it to the logger-service.

mxriverlynn commented 9 years ago

I'm not sure I understand the request. Can you elaborate with code sample of what you would like to be able to do?

rtorino commented 9 years ago

@derickbailey our use case is to send every response to a logger-service. In this line https://github.com/derickbailey/rabbus/blob/master/rabbus/lib/responder.js#L90 where reply event is emitted, it could be useful if we could pass the response object like that.emit("reply", response);

mxriverlynn commented 9 years ago

this is done in the dev branch. hoping for a release soon.