I'm researching a workflow engine to organize some system flows.
As part of the research I want to build a small workflow poc:
The workflow should listen to some event and than start (lets say customer A created)
The flow is:
- Publish a work message for customer A
- Receive a work message response for customer A
- Publish a second work message for customer A
- Receive a second work message response for customer A
- End workflow
Assuming multiple workflows exist at the same time, How do I make sure each response goes to the correct workflow?
I thought of a few solutions (none I think are good enough)
- Create dynamic queues in Rabbit per workflow and as part of the message add the response queue
- Work with Kafka and read every message discarding none relevant messages.
- Responses would be posted to the api of the workflow engine.
I would love to hear better suggestions.