From the course: Building Java Microservices with gRPC

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Recap to connect user and order services

Recap to connect user and order services

From the course: Building Java Microservices with gRPC

Start my 1-month free trial

Recap to connect user and order services

- [Instructor] Now that we have the user and the order services both functioning correctly, the last bit will be, to connect both of these services. So you may think that since both of these services are anyway residing in the same project, why not just call the order dow from the user dow? Fair, but that's not what we want to do. We want to make sure that we use a gRPC call to connect both of these services. As stated already before, we emulated a setup where both of these services are running independently on different ports. And now we will connect them using a gRPC call. So what are we going to do exactly? The first thing is, we will write a gRPC Java client, which is for the order service so now we are going to write the order client class. Once this is done, then we're going to use this client in the user service implementation class. Let's recollect that the UserServiceImpl class already retrieves the user details.…

Contents