finish rabbitmq relation; refactoring