Complete the following for your Hands-on Exercise:
public static void main(String[] args) throws ExecutionException, InterruptedException {
InventoryCheckerUS inventoryChecker = new InventoryCheckerUS();
ShutdownHook.registerForShutdownHook(inventoryChecker);
inventoryChecker.run().get();
}
mvn compile exec:java@inventory_checker_us
The terminal output for InventoryCheckerUS.java should look as follows:
Starting sn_training.dev_training.InventoryCheckerUS
Handling message: 1US
Creating new producer with topic persistent://student31/developer/order_approved
Published and will acknowledge message 1US to topic persistent://student31/developer/order_approved
Handling message: 3US
Published and will acknowledge message 3US to topic persistent://student31/developer/order_approved
Handling message: 5US
Published and will acknowledge message 5US to topic persistent://student31/developer/order_approved
Handling message: 7US
Published and will acknowledge message 7US to topic persistent://student31/developer/order_approved
Handling message: 9US
Published and will acknowledge message 9US to topic persistent://student31/developer/order_approved
Handling message: 11US
Published and will acknowledge message 11US to topic persistent://student31/developer/order_approved
Handling message: 13US
Published and will acknowledge message 13US to topic persistent://student31/developer/order_approved
Handling message: 15US
Published and will acknowledge message 15US to topic persistent://student31/developer/order_approved
Handling message: 17US
Published and will acknowledge message 17US to topic persistent://student31/developer/order_approved
Handling message: 19US
Published and will acknowledge message 19US to topic persistent://student31/developer/order_approved
Handling message: 21US
Creating new producer with topic persistent://student31/developer/order_declined
Published and will acknowledge message 21US to topic persistent://student31/developer/order_declined
Handling message: 23US
Published and will acknowledge message 23US to topic persistent://student31/developer/order_declined
The application should now look like the following:
