added rabbitmq and optimized