Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication Between two microservices using ASP.Net Core WebApi #16

Closed
kmuthugtk opened this issue Apr 27, 2021 · 1 comment
Closed

Comments

@kmuthugtk
Copy link

I have two Microservices. First Service for Customers and Second service for Invoice Service.

In Invoice MicroService, I will save only CustomerId in Invoice services. Using this CustomerId, I would like to retrieve all the related data for Customer Microservice. But i don't know to communicate async.

Any please get me some ideas and examples

@mehmetozkaya
Copy link
Member

You cant make async communicate in that case. this is the topic that data management in microservices. there are several best practices that you can use. my recommendation is duplicate customer data in invoice microservice and update customer data async when it is changed in customer microservice by triggering an event to event bus.

https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/distributed-data

https://developers.redhat.com/blog/2019/05/23/data-as-a-microservice-distributed-data-focused-integration/

https://blog.christianposta.com/microservices/the-hardest-part-about-microservices-data/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants