private function checkMessageStatus($message)
    {
        if (!$message || $message->success == 0 || $message->failure > 0) {
            throw new DispatchMessageException(
                sprintf("%d messages could not be processed", $message->failure)
            );
        }
    }