adding logic to reconnect to rabbitmq server if it goes down