I have an use case which needs needs to do the following:
- On receipt of a request make service call A, B, C, D and then send the response
- Between each of the service calls, log before and after the call
- B & C can be called after A, but D has to be called after both B & C are complete.
- Implement a generic error channel for all error handling and send response
- Ability to skip steps or start at a given step. Metadata to identify the step will be in request.
Currently I have implemented by having a message channel between each of the step, meaning each step receives request from its inbound channel and once it completes its task, it posts on the inbound channel of the next step. Logging before and after is achieved through wireTap.
What is the best approach?
thank you,