I'm trying to seperate the ASP Web-API from the workers which interact with the daterbase using RabbitMQ as MessageBroker. Im starting with a CRUD.
So the controller got the postrequest, a message was created and and the consumer (worker) saved the object in the db. But the Web-API is supposed to return the Id of the saved object or some error if the worker failed.
So how does it get the id from the worker?
Should a create a 2nd massage in the worker and make the API-Project subscribe to it?
Am i supposed to build this more like CQRS and just inform the User with 200, the post-request was received and inform him again later when the request was processed using a different microservice?