// this class is a BusConsumer too
// listen for exit signal (an event) and call onExit method if received
listener.consumeEventFrom("app.event.system.exit");
// Stop on initialization error.
final BootStatus currentStatus = BootStatus.getCurrentStatus();
if (!BootStatus.STARTED.equals(currentStatus)) {
kill(currentStatus.getCode());
}
// just for testing, don't mind it
new StompDispatcher();