refactoring async sqs write