remove race condition for rabbitmq