Distributed Transaction, Saga Pattern, Axon Framework, Spring Boot, Microservices.
public void onCompleteShipEvent(CompleteShipEvent event) { Shipment shipment = new Shipment(); try { //SIMULATE A SHIPMENT GATEWAY ERROR IF USER ID IS RWE0004 if(event.getUserId().equalsIgnoreCase("RWE0004")) { throw new Exception("Error"); } shipment.setOrderId(event.getOrderId());