Some refactoring for splitting message delivery to SQS