Class RequestPayloadCalculator

    • Method Detail

      • calculateMessageSize

        public static <RequestT> Optional<Integer> calculateMessageSize​(RequestT request)
        Evaluates the total size of the message body, message attributes, and message system attributes for a SendMessageRequest. If the request is not a SendMessageRequest, returns an empty Optional.
        Type Parameters:
        RequestT - the type of the request
        Parameters:
        request - the request to evaluate
        Returns:
        an Optional containing the total size in bytes if the request is a SendMessageRequest, otherwise an empty Optional