Is it OK to use the DbContext used by MassTransit to store the StateMachines as a regular DbContext?
In my application we want to implement the following scenario (removed validation and err handling):
- A queue request comes in through an asp.net mvc api
- The request gets published by MassTransit. The correlation id is returned as response
- The request gets split in N smaller requests
- They smaller requests get handled in parallell
- If all the smaller requests are finished the main request is handled
The progress and status of the queue request should be queryable through the api.
If I read the docs correctly this is what StateMachine and Saga are used for. The saga is working and tested, but now I want to implement the part where I can query the state information.
Should I use the EFCore DbContext that is used as persistance for MassTransit as a regular DbContext?
Is there an existing way to better communicate this data store is not for writing outside masstransit?
Is there a better way to interrogate a StateMachine or Saga?