public void run() {
        try {
            monitor = new DemoMessagingMBean();
            start();
            runFor(1, TimeUnit.HOURS, PROCESSING_TIME_MILLIS);
            shutdown();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }