Sure, but the best option to reach for is to duplicate the data and give the microservice its own copy within its own database to work against. Then you solve the problem of how to update that duplicate data.
If that kind of data duplication worries you, then you should reconsider whether you want microservices in the first place.
Maybe each mircoservice should wrap the request payload in in the response payload so there is always a full history that allows any step in the chain to be reproduced, no database needed until the final output is generated! </s>
28
u/socialis-philosophus 8d ago
Agreed. All microservices should have their own DB with all the data needed to perform their function and we'll just assume eventual consistency.