Message consumption refactoring