Refactoring for new message message queue integration