Refactoring for new Message-Queue protocol