refactoring RMQ Server