boolean shouldRetry(Reply reply) {
        int numErrors = reply.getNumErrors();
        if (numErrors == 0) {
            return false;
        }
        for (int i = 0; i < numErrors; ++i) {
            if (!retryPolicy.canRetry(reply.getError(i).getCode())) {
                return false;
            }
        }
        synchronized (monitor) {
            return !destroyed;
        }
    }
Returns whether or not the given reply should be retried.

@param reply The reply to check.
@return True if retry is required.
messagebus/src/main/java/com/yahoo/messagebus/routing/Resender.java