add shutdown hook to RythmConfigurer so that we can gracefully shutdown RythmEngine