clamp-orchestrator / clamp-core

A microservices flow orchestrator and workflow manager.
https://clamp-orchestrator.github.io/clamp-orchestrator/
MIT License
9 stars 4 forks source link

Build a message correlation to service request #61

Open tejash-jl opened 4 years ago

tejash-jl commented 4 years ago

When a downstream service is sending back the response to claim for the ASYNC step, instead of storing and sending the service request id it will be good to have a custom key that can correlate to the service request in execution.

Ex: Workflow: Create Order (SYNC)-> Dispatch Order(ASYNC) Since the dispatch order step is ASYNC, the downstream service need to respond back (via HTTP/KAFKA/AMQP). While sending back the response it needs to send the service request-id which initiated this step. In certain circumstance for domain constrain it cannot store the service request-id, in that scenario we can have a correlation key which can be used instead. In this scenario, we can have a correlation key as order_id. Clamp should map the response back to the service request based on the correlation key defined while creating the workflow.