-
Notifications
You must be signed in to change notification settings - Fork 54
Description
I have 1 router service. It is listening to RESTful requests. When it gets a request it takes the post data and transfers it to another service via sendMessage(). The other process is built to take the data, process it, and return the result. The problem is that sendMessage has no callback functionality and cannot be chained with a then() to start working on the result - by either sending it to another service or routing it back to the user.
Is the only way to achieve this is by defining the process.js service as a hydra-express process with a restfulAPI? makeAPIrequest does allow for a callback function handling the response.
Another cumbersome way would be to open a different route on the router.js which will listen to the response from the service. But then how do i relay this response back to the user?