From the course: Azure Microservices with .NET Core for Developers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Synchronous communication to the customers microservice - Azure Tutorial
From the course: Azure Microservices with .NET Core for Developers
Solution: Synchronous communication to the customers microservice
(upbeat music) - [Narrator] Let me show you how I managed to implement the communication to the customers' microservice. I added these ICustomersService interface. Here, I'm returning a dynamic object rather than a concrete model object. This is because I'm using the entire customer information that I'm receiving from the customers microservice. But you could add a specific model class and deserialize the data to that type if you need to. Next I implemented this interface inside this customer service pass, where I'm injecting these IHttpClientFactory reference. And also I'm injecting these ILogger of type customer service logger object. Here in the get customer async methods I'm invoking the microservice by using these api/customers/customer id endpoint. And I'm receiving the response then I'm deserealizing the data by using this JsonSerializer class. I also modified this startup class. So, I'm adding these customer…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Preparing and implementing the search service8m 43s
-
(Locked)
Invoking the orders microservice from search9m 59s
-
(Locked)
Invoking the products microservice from search8m 16s
-
(Locked)
Add resiliency to the products microservice with Polly4m 8s
-
(Locked)
Challenge: Synchronous communication to the customers microservice1m 14s
-
(Locked)
Solution: Synchronous communication to the customers microservice2m 47s
-
-
-
-
-