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.

Define order.proto and generate stubs

Define order.proto and generate stubs

From the course: Building Java Microservices with gRPC

Start my 1-month free trial

Define order.proto and generate stubs

- [Instructor] The last module is going to focus on building the order service in Java using gRPC. Let's go ahead and execute the steps to implement the order service. The steps have been listed on your screen, let's go through them one by one. As I said earlier, the flow will be pretty much the same that we've done in the user service. There are a couple of steps which are a little different, but we will see when we get there. So the first step will be to write the order proto file and generate the steps. So let's go back to the IDE and under the proto folder, I will add a new file. Let's name this order.proto. So this will start with defining the syntax of proto that we want to use, that will be proto3. The next one will be the java_package. So in order to make sure that we are consistent, if you open the user.proto, this is what we did for the user. So for the order, we'll say "com.shopping.stubs.orders." The next…

Contents