class CargoHandledConsumer implements MessageListener {

  private final CargoInspectionService cargoInspectionService;
  private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

  public CargoHandledConsumer(CargoInspectionService cargoInspectionService) {
    this.cargoInspectionService = cargoInspectionService;
  }

  @Override
  public void onMessage(final Message message) {<FILL_FUNCTION_BODY>}
}

    try {
      final TextMessage textMessage = (TextMessage) message;
      final String trackingidString = textMessage.getText();
      
      cargoInspectionService.inspectCargo(new TrackingId(trackingidString));
    } catch (Exception e) {
      logger.error("Error consuming CargoHandled message", e);
    }
  
<no_super_class>