...

/

The Depot, Order Processing, and Payments Modules

The Depot, Order Processing, and Payments Modules

Look at the Depot, Order Processing and Payments modules and its share of commands in more detail.

The Depot module

The Depot module has three commands and a reply that we need to define. CreateShoppingList is a slightly interesting protocol buffer message:

message CreateShoppingList {
message Item {
string product_id = 1;
string store_id = 2;
int32 quantity = 3;
}
string order_id = 1;
repeated Item items = 2;
}
Protocol buffer message for CreateShoppingList

What is interesting is that it is not a copy of the OrderCreated event from the Order Processing module.

  • First, we do not have a ShoppingId that can be added yet.

  • Second, we don’t need to be generic and include requirements for data we don’t need for a command in the Depot module.

Something that’s maybe not all that interesting but worth pointing out is that we did not copy and paste this message, forcing us to do unnecessary work. ...